fixed the navigation of the pages