Fix duplication routine.