Index: applications/editors/josm/plugins/FastDraw/build.xml
===================================================================
--- applications/editors/josm/plugins/FastDraw/build.xml	(revision 33730)
+++ applications/editors/josm/plugins/FastDraw/build.xml	(revision 33731)
@@ -4,5 +4,5 @@
     <property name="commit.message" value="[josm_fastdraw] Fix incorrect settings saving-2"/>
     <!-- enter the *lowest* JOSM version this plugin is currently compatible with -->
-    <property name="plugin.main.version" value="12683"/>
+    <property name="plugin.main.version" value="12987"/>
     
     <!-- Configure these properties (replace "..." accordingly).
Index: applications/editors/josm/plugins/FastDraw/src/org/openstreetmap/josm/plugins/fastdraw/FDSettings.java
===================================================================
--- applications/editors/josm/plugins/FastDraw/src/org/openstreetmap/josm/plugins/fastdraw/FDSettings.java	(revision 33730)
+++ applications/editors/josm/plugins/FastDraw/src/org/openstreetmap/josm/plugins/fastdraw/FDSettings.java	(revision 33731)
@@ -9,14 +9,15 @@
 
 import org.openstreetmap.josm.Main;
-import org.openstreetmap.josm.data.preferences.ColorProperty;
+import org.openstreetmap.josm.data.preferences.NamedColorProperty;
 import org.openstreetmap.josm.gui.util.GuiHelper;
+import org.openstreetmap.josm.tools.Logging;
 
 public class FDSettings {
-    public ColorProperty COLOR_FIXED = new ColorProperty("fastdraw.color.delete", Color.red);
-    public ColorProperty COLOR_NORMAL = new ColorProperty("fastdraw.color.edit", Color.orange);
-    public ColorProperty COLOR_DELETE = new ColorProperty("fastdraw.color.fixed", Color.green);
-    public ColorProperty COLOR_SELECTEDFRAGMENT = new ColorProperty("fastdraw.color.normal", Color.red);
-    public ColorProperty COLOR_EDITEDFRAGMENT = new ColorProperty("fastdraw.color.select", Color.blue);
-    public ColorProperty COLOR_SIMPLIFIED = new ColorProperty("fastdraw.color.simplified", Color.orange);
+    public NamedColorProperty COLOR_FIXED = new NamedColorProperty("fastdraw.color.delete", Color.red);
+    public NamedColorProperty COLOR_NORMAL = new NamedColorProperty("fastdraw.color.edit", Color.orange);
+    public NamedColorProperty COLOR_DELETE = new NamedColorProperty("fastdraw.color.fixed", Color.green);
+    public NamedColorProperty COLOR_SELECTEDFRAGMENT = new NamedColorProperty("fastdraw.color.normal", Color.red);
+    public NamedColorProperty COLOR_EDITEDFRAGMENT = new NamedColorProperty("fastdraw.color.select", Color.blue);
+    public NamedColorProperty COLOR_SIMPLIFIED = new NamedColorProperty("fastdraw.color.simplified", Color.orange);
 
     public double maxDist;
@@ -56,6 +57,6 @@
         simplifiedStroke = GuiHelper.getCustomizedStroke(Main.pref.get("fastdraw.stroke.simplified", "2"));
 
-        bigDotSize = Main.pref.getInteger("fastdraw.point.bigsize", 7);
-        dotSize = Main.pref.getInteger("fastdraw.point.normalsize", 5);
+        bigDotSize = Main.pref.getInt("fastdraw.point.bigsize", 7);
+        dotSize = Main.pref.getInt("fastdraw.point.normalsize", 5);
 
         maxDist = Main.pref.getDouble("fastdraw.maxdist", 5);
@@ -65,5 +66,5 @@
         startingEps = Main.pref.getDouble("fastdraw.startingEps", 5);
         maxPointsPerKm = Main.pref.getDouble("fastdraw.maxpkm", 150);
-        pkmBlockSize = Main.pref.getInteger("fastdraw.pkmblocksize", 10);
+        pkmBlockSize = Main.pref.getInt("fastdraw.pkmblocksize", 10);
         drawLastSegment = Main.pref.getBoolean("fastdraw.drawlastsegment", true);
         snapNodes = Main.pref.getBoolean("fastdraw.snapnodes", true);
@@ -71,5 +72,5 @@
         fixedSpacebar = Main.pref.getBoolean("fastdraw.fixedspacebar", false);
         drawClosed = Main.pref.getBoolean("fastdraw.drawclosed", false);
-        simplifyMode = Main.pref.getInteger("fastdraw.simplifymode", 0) % 3;
+        simplifyMode = Main.pref.getInt("fastdraw.simplifymode", 0) % 3;
         allowEditExistingWays = Main.pref.getBoolean("fastdraw.alloweditexisting", false);
 
@@ -84,17 +85,17 @@
         Main.pref.putDouble("fastdraw.startingEps", startingEps);
         Main.pref.putDouble("fastdraw.maxpkm", maxPointsPerKm);
-        Main.pref.putInteger("fastdraw.pkmblocksize", pkmBlockSize);
-        Main.pref.put("fastdraw.drawlastsegment", drawLastSegment);
-        Main.pref.put("fastdraw.snapnodes", snapNodes);
-        Main.pref.put("fastdraw.fixedclick", fixedClick);
-        Main.pref.put("fastdraw.fixedspacebar", fixedSpacebar);
-        Main.pref.put("fastdraw.drawclosed", drawClosed);
-        Main.pref.putInteger("fastdraw.simplifymode", simplifyMode);
+        Main.pref.putInt("fastdraw.pkmblocksize", pkmBlockSize);
+        Main.pref.putBoolean("fastdraw.drawlastsegment", drawLastSegment);
+        Main.pref.putBoolean("fastdraw.snapnodes", snapNodes);
+        Main.pref.putBoolean("fastdraw.fixedclick", fixedClick);
+        Main.pref.putBoolean("fastdraw.fixedspacebar", fixedSpacebar);
+        Main.pref.putBoolean("fastdraw.drawclosed", drawClosed);
+        Main.pref.putInt("fastdraw.simplifymode", simplifyMode);
         Main.pref.put("fastdraw.autotags", autoTags);
-        Main.pref.put("fastdraw.alloweditexisting", allowEditExistingWays);
+        Main.pref.putBoolean("fastdraw.alloweditexisting", allowEditExistingWays);
         try {
             Main.pref.save();
         } catch (IOException e) {
-            System.err.println(tr("Can not save preferences"));
+            Logging.error(tr("Can not save preferences"));
         }
     }
Index: applications/editors/josm/plugins/FastDraw/src/org/openstreetmap/josm/plugins/fastdraw/FastDrawConfigDialog.java
===================================================================
--- applications/editors/josm/plugins/FastDraw/src/org/openstreetmap/josm/plugins/fastdraw/FastDrawConfigDialog.java	(revision 33730)
+++ applications/editors/josm/plugins/FastDraw/src/org/openstreetmap/josm/plugins/fastdraw/FastDrawConfigDialog.java	(revision 33731)
@@ -66,5 +66,5 @@
         pasteButton.setToolTipText(tr("Try copying tags from properties table"));
 
-        ArrayList<String> history = new ArrayList<>(Main.pref.getCollection("fastdraw.tags-history"));
+        ArrayList<String> history = new ArrayList<>(Main.pref.getList("fastdraw.tags-history"));
         while (history.remove("")) { };
         addTags.setPossibleItems(history);
@@ -131,5 +131,5 @@
                     addTags.addCurrentItemToHistory();
                 }
-                Main.pref.putCollection("fastdraw.tags-history", addTags.getHistory());
+                Main.pref.putList("fastdraw.tags-history", addTags.getHistory());
                 settings.savePrefs();
             } catch (ParseException e) {
Index: applications/editors/josm/plugins/FastDraw/src/org/openstreetmap/josm/plugins/fastdraw/FastDrawingMode.java
===================================================================
--- applications/editors/josm/plugins/FastDraw/src/org/openstreetmap/josm/plugins/fastdraw/FastDrawingMode.java	(revision 33730)
+++ applications/editors/josm/plugins/FastDraw/src/org/openstreetmap/josm/plugins/fastdraw/FastDrawingMode.java	(revision 33731)
@@ -29,4 +29,5 @@
 import org.openstreetmap.josm.data.Bounds;
 import org.openstreetmap.josm.data.coor.LatLon;
+import org.openstreetmap.josm.data.osm.DataSet;
 import org.openstreetmap.josm.data.osm.Node;
 import org.openstreetmap.josm.data.osm.OsmPrimitive;
@@ -535,4 +536,5 @@
         if (line.isClosed() && n == 3) pts.remove(2); // two-point way can not be closed
 
+        DataSet ds = getLayerManager().getEditDataSet();
         Collection<Command> cmds = new LinkedList<>();
         int i = 0;
@@ -559,5 +561,5 @@
                 } else {
                     nd = new Node(p);
-                    cmds.add(new AddCommand(nd));
+                    cmds.add(new AddCommand(ds, nd));
                 }
             }
@@ -595,7 +597,6 @@
             }
             oldWay = null; // that is all with this command
-        } else cmds.add(new AddCommand(w));
+        } else cmds.add(new AddCommand(ds, w));
         Command c = new SequenceCommand(tr("Draw the way by mouse"), cmds);
-        if (getLayerManager().getEditLayer() == null) return;
         MainApplication.undoRedo.add(c);
         lineWasSaved = true;
@@ -603,5 +604,5 @@
         if (autoExit) {
             // Select this way and switch drawing mode off
-            getLayerManager().getEditDataSet().setSelected(w);
+            ds.setSelected(w);
             MainApplication.getMap().selectSelectTool(false);
         }
