Index: applications/editors/josm/plugins/relcontext/src/relcontext/ChosenRelation.java
===================================================================
--- applications/editors/josm/plugins/relcontext/src/relcontext/ChosenRelation.java	(revision 25749)
+++ applications/editors/josm/plugins/relcontext/src/relcontext/ChosenRelation.java	(revision 25751)
@@ -63,7 +63,11 @@
      */
     public boolean isMultipolygon() {
-        if( chosenRelation == null )
+        return isMultipolygon(chosenRelation);
+    }
+
+    public static boolean isMultipolygon( Relation r ) {
+        if( r == null )
             return false;
-        String type = chosenRelation.get("type");
+        String type = r.get("type");
         if( type == null )
             return false;
Index: applications/editors/josm/plugins/relcontext/src/relcontext/actions/AddRemoveMemberAction.java
===================================================================
--- applications/editors/josm/plugins/relcontext/src/relcontext/actions/AddRemoveMemberAction.java	(revision 25749)
+++ applications/editors/josm/plugins/relcontext/src/relcontext/actions/AddRemoveMemberAction.java	(revision 25751)
@@ -9,4 +9,5 @@
 import org.openstreetmap.josm.actions.JosmAction;
 import org.openstreetmap.josm.command.ChangeCommand;
+import org.openstreetmap.josm.command.Command;
 import org.openstreetmap.josm.data.osm.Node;
 import org.openstreetmap.josm.data.osm.OsmPrimitiveType;
@@ -49,4 +50,7 @@
         toAdd.removeAll(r.getMemberPrimitives());
 
+        // 0. check if relation is broken (temporary)
+        boolean isBroken = !toAdd.isEmpty() && SortAndFixAction.needsFixing(r);
+
         // 1. remove all present members
         r.removeMembersFor(getCurrentDataSet().getSelected());
@@ -60,4 +64,9 @@
                 r.addMember(pos, new RelationMember("", p));
         }
+
+        // 3. check for roles again (temporary)
+        Command roleFix = !isBroken && SortAndFixAction.needsFixing(r) ? SortAndFixAction.fixRelation(r) : null;
+        if( roleFix != null )
+            roleFix.executeCommand();
 
         if( !r.getMemberPrimitives().equals(rel.get().getMemberPrimitives()) )
Index: applications/editors/josm/plugins/relcontext/src/relcontext/actions/SortAndFixAction.java
===================================================================
--- applications/editors/josm/plugins/relcontext/src/relcontext/actions/SortAndFixAction.java	(revision 25749)
+++ applications/editors/josm/plugins/relcontext/src/relcontext/actions/SortAndFixAction.java	(revision 25751)
@@ -8,4 +8,5 @@
 import org.openstreetmap.josm.Main;
 import org.openstreetmap.josm.command.ChangeCommand;
+import org.openstreetmap.josm.command.Command;
 import org.openstreetmap.josm.data.osm.*;
 import org.openstreetmap.josm.tools.ImageProvider;
@@ -27,6 +28,19 @@
 
     public void actionPerformed( ActionEvent e ) {
-        if( rel.get() == null ) return;
-        Relation r = rel.get();
+        Command c = fixRelation(rel.get());
+        if( c != null )
+            Main.main.undoRedo.add(c);
+    }
+
+    public void chosenRelationChanged( Relation oldRelation, Relation newRelation ) {
+        setEnabled(newRelation != null && needsFixing( newRelation));
+    }
+
+    public static boolean needsFixing( Relation rel ) {
+        return !isIncomplete(rel) && (areMultipolygonTagsEmpty(rel) || areBoundaryTagsNotRight(rel));
+    }
+
+    public static Command fixRelation( Relation rel ) {
+        Relation r = rel;
         boolean fixed = false;
         // todo: sort members
@@ -44,13 +58,8 @@
         }
 
-        if( fixed )
-            Main.main.undoRedo.add(new ChangeCommand(rel.get(), r));
+        return fixed ? new ChangeCommand(rel, r) : null;
     }
 
-    public void chosenRelationChanged( Relation oldRelation, Relation newRelation ) {
-        setEnabled(newRelation != null && !isIncomplete(newRelation) && (areMultipolygonTagsEmpty() || areBoundaryTagsNotRight()));
-    }
-
-    protected boolean isIncomplete( Relation r ) {
+    protected static boolean isIncomplete( Relation r ) {
         if( r == null || r.isIncomplete() || r.isDeleted() )
             return true;
@@ -64,7 +73,6 @@
      * Check for ways that have roles different from "outer" and "inner".
      */
-    private boolean areMultipolygonTagsEmpty() {
-        Relation r = rel == null ? null : rel.get();
-        if( r == null || r.getMembersCount() == 0 || !rel.isMultipolygon() )
+    private static boolean areMultipolygonTagsEmpty( Relation r ) {
+        if( r == null || r.getMembersCount() == 0 || !ChosenRelation.isMultipolygon(r) )
             return false;
         for( RelationMember m : r.getMembers() ) {
@@ -78,6 +86,5 @@
      * Check for nodes and relations without needed roles.
      */
-    private boolean areBoundaryTagsNotRight() {
-        Relation r = rel == null ? null : rel.get();
+    private static boolean areBoundaryTagsNotRight( Relation r ) {
         if( r == null || r.getMembersCount() == 0 || !r.hasKey("type") || !r.get("type").equals("boundary") )
             return false;
@@ -94,5 +101,5 @@
      * Basically, created multipolygon from scratch, and if successful, replace roles with new ones.
      */
-    private Relation fixMultipolygonRoles( Relation source ) {
+    private static Relation fixMultipolygonRoles( Relation source ) {
         Collection<Way> ways = new ArrayList<Way>();
         for( OsmPrimitive p : source.getMemberPrimitives() )
@@ -131,5 +138,5 @@
     }
 
-    private Relation fixBoundaryRoles( Relation source ) {
+    private static Relation fixBoundaryRoles( Relation source ) {
         Relation r = new Relation(source);
         boolean fixed = false;
