Fixed pagination so that no preemptive fetching of next page to check if it is last one is necessary