Fix exception with multiple views.