Delete duplicates when doing import sorting