fix a issue with pagination.