Fixed replaying of simulation.