fix sort n