Fixed some bugs with the views