-Fixed bugs in pagination