bug fix: big page number can make code loop forever
Merge pull request #2 from realint/patch-1

bug fix: big page number can make code loop forever