solved sort bug