Update statemachine.php