Fixed bug with crashing views.