fixing leaks.