fixing duplicates after copy