fix bug
and qsort reset.