fixed sort issue