clean up a memory leak