memory leaks patched