fix deep copy bug