fixed issue #49; simulator terminates correctly now