fixed a couple of leaks