correcting pagination