Index: /applications/editors/josm/plugins/indoor_sweepline/src/indoor_sweepline/CorridorGeography.java
===================================================================
--- /applications/editors/josm/plugins/indoor_sweepline/src/indoor_sweepline/CorridorGeography.java	(revision 32106)
+++ /applications/editors/josm/plugins/indoor_sweepline/src/indoor_sweepline/CorridorGeography.java	(revision 32107)
@@ -17,5 +17,9 @@
     
     
-    private void setExtraElements(CorridorPart.ReachableSide side, LatLon from, LatLon to, boolean extraWayUp)
+    private static final double MIN_LENGTH = 10.;
+    
+    
+    private void setExtraElements(CorridorPart.ReachableSide side, LatLon from, LatLon to,
+	boolean extraWayUp, double minLength)
     {
 	LatLon middleCoor = new LatLon((from.lat() + to.lat())/2.,
@@ -52,6 +56,9 @@
 	    
 	double scale = Math.cos(middleCoor.lat() * (Math.PI/180.));
-	LatLon detachedCoor = new LatLon(middleCoor.lat() + (start.lon() - middleCoor.lon()) * scale,
-	    middleCoor.lon() - (start.lat() - middleCoor.lat()) / scale);
+	double length = Math.sqrt((start.lat() - middleCoor.lat()) * (start.lat() - middleCoor.lat()) +
+	    (start.lon() - middleCoor.lon()) * (start.lon() - middleCoor.lon()) * scale * scale) / 180. * 20000000.;
+	double lengthFactor = length < minLength ? minLength / length : 1.;
+	LatLon detachedCoor = new LatLon(middleCoor.lat() + (start.lon() - middleCoor.lon()) * scale * lengthFactor,
+	    middleCoor.lon() - (start.lat() - middleCoor.lat()) / scale * lengthFactor);
 	if (detachedNode == null)
 	{
@@ -89,5 +96,5 @@
 	if (type == CorridorPart.Type.STAIRS_UP || type == CorridorPart.Type.STAIRS_DOWN)
 	{
-	    setExtraElements(side, from, to, type == CorridorPart.Type.STAIRS_UP);
+	    setExtraElements(side, from, to, type == CorridorPart.Type.STAIRS_UP, MIN_LENGTH);
 	    target.appendNode(middleNode);
 
@@ -109,5 +116,5 @@
 		type == CorridorPart.Type.ESCALATOR_UP_LEAVING
 		|| type == CorridorPart.Type.ESCALATOR_UP_ARRIVING
-		|| type == CorridorPart.Type.ESCALATOR_UP_BIDIRECTIONAL);
+		|| type == CorridorPart.Type.ESCALATOR_UP_BIDIRECTIONAL, MIN_LENGTH);
 	    target.appendNode(middleNode);
 
@@ -129,5 +136,5 @@
 	else if (type == CorridorPart.Type.ELEVATOR)
 	{
-	    setExtraElements(side, from, to, true);
+	    setExtraElements(side, from, to, true, 0.);
 	    target.appendNode(middleNode);
 
Index: /applications/editors/josm/plugins/indoor_sweepline/src/indoor_sweepline/IndoorSweepline.java
===================================================================
--- /applications/editors/josm/plugins/indoor_sweepline/src/indoor_sweepline/IndoorSweepline.java	(revision 32106)
+++ /applications/editors/josm/plugins/indoor_sweepline/src/indoor_sweepline/IndoorSweepline.java	(revision 32107)
@@ -24,5 +24,8 @@
     {
         JMenu menu = Main.main.menu.moreToolsMenu;
-        menu.addSeparator();
+        if (menu.isVisible())
+	    menu.addSeparator();
+	else
+	    menu.setVisible(true);
         menu.add(new JMenuItem(new IndoorSweeplineWizardAction()));
     }
Index: /applications/editors/josm/plugins/indoor_sweepline/src/indoor_sweepline/IndoorSweeplineModel.java
===================================================================
--- /applications/editors/josm/plugins/indoor_sweepline/src/indoor_sweepline/IndoorSweeplineModel.java	(revision 32106)
+++ /applications/editors/josm/plugins/indoor_sweepline/src/indoor_sweepline/IndoorSweeplineModel.java	(revision 32107)
@@ -8,4 +8,12 @@
 import org.openstreetmap.josm.data.osm.DataSet;
 import org.openstreetmap.josm.gui.layer.OsmDataLayer;
+
+
+/* TODO:
+- offset
+- replicate last stopline
+- focus to useful table entry after cell edit
+- keyboard shortcuts
+*/
 
 
Index: /applications/editors/josm/plugins/indoor_sweepline/src/indoor_sweepline/ModelGeography.java
===================================================================
--- /applications/editors/josm/plugins/indoor_sweepline/src/indoor_sweepline/ModelGeography.java	(revision 32106)
+++ /applications/editors/josm/plugins/indoor_sweepline/src/indoor_sweepline/ModelGeography.java	(revision 32107)
@@ -227,10 +227,11 @@
 	    {
 		multipolygon = new Relation();
-		dataSet.addPrimitive(multipolygon);
-		
-		multipolygon.removeAll();
-		multipolygon.put("type", "multipolygon");
-		addPolygonTags(type, level, multipolygon);
+		dataSet.addPrimitive(multipolygon);		
 	    }
+	    
+	    multipolygon.removeAll();
+	    multipolygon.put("type", "multipolygon");
+	    addPolygonTags(type, level, multipolygon);
+	    
 	    multipolygon.setMembers(members);
 	}
