More memory leak fixes.