minor bugs in pagination fixed