diff looks bigger change than it is, main change was to wrap destructor code with if (initialized)