fix sorting.