1) calling on exit for current state when the state machine is deleted