Fixed a pagination bug