Correcting pagination