fix transition handling