Fix major bug in modloader