Fix to timestep calculation