Fix couple of memory leaks (osx)