Bug fix in uninstalling modules from script interface -- prevent infinite loop