Added FSM switch statement.