Fixing a small memory leak