         }
 
 
-        const builderModule:IBuilderModule = event.module.factory.create() as IBuilderModule;
+        const builderModule:IBuilderModule = moduleInfo.factory.create() as IBuilderModule;
         if (builderModule)
         {
             if (Log.isInfo())

        FlexGlobals.topLevelApplication.callLater(loadModule);
    }

    private function moduleInfo_readyHandler(event:ModuleEvent):void
    {
        if (Log.isInfo())
        {
            LOG.info('Module loaded: {0}', swf.url);
        }

        var moduleInfo:IModuleInfo = event.currentTarget as IModuleInfo;
        moduleInfo.removeEventListener(ModuleEvent.READY, moduleInfo_readyHandler);
        moduleInfo.removeEventListener(ModuleEvent.ERROR, moduleInfo_errorHandler);

        if (config && config.exists)
        {
            if (Log.isInfo())

    {
        var moduleInfo:IModuleInfo = event.module;
        moduleInfo.removeEventListener(ModuleEvent.ERROR, moduleInfo_errorHandler);
        moduleInfo.removeEventListener(ModuleEvent.PROGRESS, moduleInfo_progressHandler);
        this.moduleInfo = null;
        dispatchError();
    }
