In this paper a new clustering algorithm for vehicular ad-hoc networks (VANET) is presented. The proposed solution is a modification of the Basagnipsilas distributed and mobility-adaptive clustering (DMAC) algorithm. Some additional conditions that have to be fulfilled before the cluster head change, are introduced to better suit the road traffic. Tests performed in the simulation environment consisting of VanetMobiSim and JiST/SWANS++ show that algorithm performs better than the original solution - the clusters stability is significantly increased.