Fixed timestep bug