Fixed the compilation problem in sim.hpp