Fixed switching between views.