fix traj time calculation