Change some features of StateMachine