Fix issue with undefined nextPageURL