added resetPagination to sorting functions