Fixed issue with node destruction