fix problems with add_loadable_module