Patched a memory leak