memory leak patched