fix global leak