Fixed bug with paging button on sort