fix plugin save logic for sitewides and removing plugins