sort bug fixed