Fixed some more memory leaks.