fix bug in module loader