Dont use global module state
Merge pull request #77 from lightsofapollo/bug998362-hack

Dont use global module state