Oops, sorry I forget to complete my comment.

hmm that's dangerous, I should call "CancelActiveState" before existing from other State.