Fixed bug where page index went out of sync.

Issue #23.  Page index could go out of sync if the page size was changed
under certain circumstances..