Fixing a memory leak.