Fix major bug in modules handle