Update StateMachine.php