Fixing more memory leaks.