removing set current page from switchToPage and added to page load