Fixed a bug that caused views to sometimes not load