- state machine bug fix