fix deepcopy of cud