fix a memory leak.