view switching bug