Fix pagination for all_pages
all_pages fix
Fix pagination for all_pages