Fixed bug when a transition is cancelled