fix for timestep rounding errors