extra check against non existing page

Fixed error when trying to navigate to non-existing page.