Fixed more memory leaks.