Deepcopy data structs to avoid data shadow