rename duplicates when deleting and restoring