Fixed some bugs with displaying the page