Fixed calculation of total track length.