Fixing a memory leak by removing the preset node