Trying to fix #3611
Merge pull request #3729 from prometheansacrifice/page-outofbounds

Trying to fix #3611