Fix major issue to be used as a module