Corrected another bug on pagination