Fixed two memory leaks.