Fixed a bug with paging.