fix sort issue