Fixed bug where using the back and forward buttons resulted in the page rendering JSON, not HTML.