fixed deepcopy bug