fix a bug in exsort