More leak fixes