auto sort works properly