- fixed a state machine bug