StateMachine Fix