-fixed two minor memory leaks