Plug some mem leaks