Fixed a couple of leaks