fixed a bug where the number of pages for some of the pages were getting set to the wrong type.