fix pagination cases where sorted rows contain blanks