Fix bug with setDefaultView()