fixed a bug in the module manager