Fixed the views to work properly