Bug fixed in Simulation.cpp