Made autosort more accurate