Fix xml copy