fixed some transition bugs