fixed the state machine runner