fixed pseudo code for get-more-pages iteration