getattr bug correction when deepcopy