Fixing copying logic.