apply sort order if we have it