Fixing bugs when editing encrypted secrets