Small fix to sorting.