views switch correctly