Fix bugs in CMD plugin and PluginMangerment Plugin.