fix  memory leak.