fixed sort bug.