fix deep copy