fixes to the simulator