Fix a memory leak