Removed some possible leaks.