fixed bug in simulator reset function