copy attributes when replace:true