Fixed some activity transition bugs