Fixing a bug in transition running logic.