fix sort array