Cleanup copy function and fix uninitialized access && string childs