Fixed serious memory leak.