fixed drawing bugs in simulator