Fixed Simulator to be multithreaded