Fix bug (reference/deepcopy problem)