fixed bugs deepcopy