Changed how the simulator is stopped.