gets page numbers for stats correctly