more fix for simulate.py