fix sort n++