correct for sort order