Logic was inverted in managePlugins