fix bug in loadModule