Fix global variable leak
Merge pull request #12 from yannickcr/fix-global-leak

Fix global variable leak