Fixing some of the page navigation logic to prevent some of the links from not properly working with the back button.