fixes bug that was allowing the simulation to move backwards in time