Fix large memory leak.