Fixing critical memory leak.