max_pages fixed