fix few small remaining memory leaks