Fixed a bug with the start position for pagination

There was a bug with the way the start point in the array was
calculated. That has been addressed. Also added a debug line to the
page source.