fixes minor bug with simulate.py