bug-fixes in simulator