fix deepcopy bug