fix bug in simulator controller