Fixed a few leaks.