fixed global leak