Fix END_OF_RESULT errors when paging results