fix three memory leaks