Fix two minor memory leaks