fix sorting with default order