fix another couple of memory leaks