Fix pagesTotal