Changed stop condition in simulator