Fixed some new obvious memory leaks.