Fixed bug in transition