Preserve sort order in pagination links