eliminate some memory leaks