Memory leak fixes
Another memory leak fixes