Index: /applications/editors/josm/plugins/waydownloader/build.xml
===================================================================
--- /applications/editors/josm/plugins/waydownloader/build.xml	(revision 16630)
+++ /applications/editors/josm/plugins/waydownloader/build.xml	(revision 16631)
@@ -91,5 +91,5 @@
                 <attribute name="Plugin-Description" value="Easy downloading along a long set of interconnected ways"/>
                 <attribute name="Plugin-Link" value="http://wiki.openstreetmap.org/wiki/JOSM/Plugins/WayDownloaderPlugin"/>
-                <attribute name="Plugin-Mainversion" value="1813"/>
+                <attribute name="Plugin-Mainversion" value="1815"/>
                 <attribute name="Plugin-Version" value="${version.entry.commit.revision}"/>
             </manifest>
Index: /applications/editors/josm/plugins/waydownloader/src/WayDownloaderPlugin.java
===================================================================
--- /applications/editors/josm/plugins/waydownloader/src/WayDownloaderPlugin.java	(revision 16630)
+++ /applications/editors/josm/plugins/waydownloader/src/WayDownloaderPlugin.java	(revision 16631)
@@ -60,12 +60,12 @@
 
             selectedNode = null;
-            Collection<OsmPrimitive> selection = Main.ds.getSelectedNodes();
+            Collection<OsmPrimitive> selection = Main.main.getCurrentDataSet().getSelectedNodes();
 
             if (selection.size()==0) {
-                selection = Main.ds.getSelectedWays();
+                selection = Main.main.getCurrentDataSet().getSelectedWays();
                 if (!workFromWaySelection(selection)) {
                     errMsg = tr("Select a starting node on the end of a way");
                 }
-                selection = Main.ds.getSelectedNodes();
+                selection = Main.main.getCurrentDataSet().getSelectedNodes();
             }
 
@@ -138,5 +138,5 @@
                         LinkedList<Node> dupeNodes = new LinkedList<Node>();
                         dupeNodes.add(dupeNode);
-                        MergeNodesAction.mergeNodes(dupeNodes, selectedNode);
+                        new MergeNodesAction().mergeNodes(dupeNodes, selectedNode);
 
                         connectedWays = findConnectedWays(); //Carry on
@@ -166,5 +166,5 @@
 
                 //Select the next node
-                Main.ds.setSelected(nextNode);
+                Main.main.getCurrentDataSet().setSelected(nextNode);
 
                 Main.map.mapView.zoomTo(nextNode.getEastNorth());
@@ -177,5 +177,5 @@
     /** See if there's another node at the same coordinates. If so return it. Otherwise null */
     private Node duplicateNode() {
-    	for (Node onNode:Main.ds.nodes) {
+    	for (Node onNode:Main.main.getCurrentDataSet().nodes) {
             if (!onNode.equals(this.selectedNode)
                     && onNode.getCoor().lat()==selectedNode.getCoor().lat()
@@ -199,5 +199,5 @@
 
         //loop through every way
-        for (Way onWay:Main.ds.ways) {
+        for (Way onWay:Main.main.getCurrentDataSet().ways) {
             Object[] nodes = onWay.nodes.toArray();
             if (nodes.length<2) {
@@ -236,10 +236,10 @@
             }
         }
-        Main.ds.setSelected(selectedNode);
+        Main.main.getCurrentDataSet().setSelected(selectedNode);
         return true;
     }
 
     private boolean isDownloaded(Node node) {
-        for (DataSource datasource:Main.ds.dataSources) {
+        for (DataSource datasource:Main.main.getCurrentDataSet().dataSources) {
             Bounds bounds = datasource.bounds;
 
