more memory leak fixes.