normalizing module loader logic