removed the noUnloadPlugins check

and removed the global variable