issue-2: Stop pagination extending beyond limits of data