Fixed additional memory leaks.