Bug fix for reinstall_plugins