Fixed bug in paging.