Adding logic to handle page numbers that are either lower or greater than actual page range

...n available page range