fixed global leak.