fix global leak detected by mocha