fix transition logic so previous unfinished transitions can be properly cancelled