fix to remember the ordering in pagination