Fix a memory issue