more correct module loader logic