Index: applications/editors/josm/plugins/openstreetbugs/build.xml
===================================================================
--- applications/editors/josm/plugins/openstreetbugs/build.xml	(revision 17519)
+++ applications/editors/josm/plugins/openstreetbugs/build.xml	(revision 17520)
@@ -26,5 +26,5 @@
                 <attribute name="Plugin-Description" value="Imports issues from OpenStreetBugs"/>
                 <attribute name="Plugin-Link" value="http://wiki.openstreetmap.org/index.php/JOSM/Plugins/OpenStreetBugs"/>
-                <attribute name="Plugin-Mainversion" value="2010"/>
+                <attribute name="Plugin-Mainversion" value="2067"/>
                 <attribute name="Plugin-Version" value="${version.entry.commit.revision}"/>
             </manifest>
Index: applications/editors/josm/plugins/openstreetbugs/src/org/openstreetmap/josm/plugins/osb/OsbLayer.java
===================================================================
--- applications/editors/josm/plugins/openstreetbugs/src/org/openstreetmap/josm/plugins/osb/OsbLayer.java	(revision 17519)
+++ applications/editors/josm/plugins/openstreetbugs/src/org/openstreetmap/josm/plugins/osb/OsbLayer.java	(revision 17520)
@@ -68,5 +68,5 @@
 
     private JToolTip tooltip = new JToolTip();
-    
+
     private static ImageIcon iconError = OsbPlugin.loadIcon("icon_error16.png");
     private static ImageIcon iconValid = OsbPlugin.loadIcon("icon_valid16.png");
@@ -83,5 +83,5 @@
         // if the map layer has been closed, while we are requesting the osb db,
         // the mapframe is null, so we check that, before installing the mouse listener
-        if(Main.map != null && Main.map.mapView != null) { 
+        if(Main.map != null && Main.map.mapView != null) {
             Main.map.mapView.addMouseListener(this);
         }
@@ -125,5 +125,5 @@
 
             // don't paint deleted nodes
-            if(node.deleted)
+            if(!node.isUsable())
                 continue;
 
@@ -140,26 +140,26 @@
             });
         }
-        
+
         if(selection == null)
             return;
-        
+
         // This loop renders the selection border and tooltips so they get drawn
         // on top of the bug icons
         for (int i = 0; i < nodes.length; i++) {
             Node node = (Node) nodes[i];
-            
-            if(node.deleted || !selection.contains(node))
-                continue;
-            
+
+            if(!node.isUsable() || !selection.contains(node))
+                continue;
+
             // draw selection border
             Point p = mv.getPoint(node);
-            
+
             ImageIcon icon = ("1".equals(node.get("state"))) ? iconValid : iconError;
             int width = icon.getIconWidth();
             int height = icon.getIconHeight();
-            
+
             g.setColor(ColorHelper.html2color(Main.pref.get("color.selected")));
-            g.drawRect(p.x - (width / 2), p.y - (height / 2), 16, 16);
-            
+            g.drawRect(p.x-(width/2), p.y-(height/2), width-1, height-1);
+
             // draw description
             String desc = node.get("note");
@@ -175,22 +175,22 @@
             // draw description as a tooltip
             tooltip.setTipText(desc);
-            
+
             int tx = p.x + (width / 2) + 5;
             int ty = (int)(p.y - height / 2) -1;
             g.translate(tx, ty);
-            
+
             // This limits the width of the tooltip to 2/3 of the drawing
             // area, which makes longer tooltips actually readable (they
             // would disappear if scrolled too much to the right)
-            
+
             // Need to do this twice as otherwise getPreferredSize doesn't take
             // the reduced width into account
             for(int x = 0; x < 2; x++) {
-                Dimension d = tooltip.getUI().getPreferredSize(tooltip);                
+                Dimension d = tooltip.getUI().getPreferredSize(tooltip);
                 d.width = Math.min(d.width, (int)(mv.getWidth()*2/3));
                 tooltip.setSize(d);
                 tooltip.paint(g);
             }
-            
+
             g.translate(-tx, -ty);
         }
@@ -210,5 +210,5 @@
         Node minPrimitive = null;
         for (Node n : data.nodes) {
-            if (n.deleted || n.incomplete)
+            if (!n.isUsable())
                 continue;
             Point sp = Main.map.mapView.getPoint(n);
Index: applications/editors/josm/plugins/openstreetbugs/src/org/openstreetmap/josm/plugins/osb/api/DownloadAction.java
===================================================================
--- applications/editors/josm/plugins/openstreetbugs/src/org/openstreetmap/josm/plugins/osb/api/DownloadAction.java	(revision 17519)
+++ applications/editors/josm/plugins/openstreetbugs/src/org/openstreetmap/josm/plugins/osb/api/DownloadAction.java	(revision 17520)
@@ -85,6 +85,7 @@
             double lon = Double.parseDouble(m.group(2));
             LatLon latlon = new LatLon(lat, lon);
-            Node osmNode = new Node(latlon);
-            osmNode.id = Long.parseLong(m.group(1));
+            Node osmNode = new Node(Long.parseLong(m.group(1)));
+            osmNode.setCoor(latlon);
+            osmNode.incomplete = false;
             osmNode.put("id", m.group(1));
             osmNode.put("note", m.group(4));
Index: applications/editors/josm/plugins/openstreetbugs/src/org/openstreetmap/josm/plugins/osb/gui/OsbDialog.java
===================================================================
--- applications/editors/josm/plugins/openstreetbugs/src/org/openstreetmap/josm/plugins/osb/gui/OsbDialog.java	(revision 17519)
+++ applications/editors/josm/plugins/openstreetbugs/src/org/openstreetmap/josm/plugins/osb/gui/OsbDialog.java	(revision 17520)
@@ -79,5 +79,5 @@
 
 public class OsbDialog extends ToggleDialog implements OsbObserver, ListSelectionListener, LayerChangeListener,
-        DataChangeListener, MouseListener, OsbActionObserver {
+DataChangeListener, MouseListener, OsbActionObserver {
 
     private static final long serialVersionUID = 1L;
@@ -188,5 +188,5 @@
 
         for (Node node : sortedList) {
-            if (!node.deleted) {
+            if (node.isUsable()) {
                 model.addElement(new OsbListItem(node));
             }
@@ -218,10 +218,15 @@
 
             OsbAction.setSelectedNode(node);
-
             scrollToSelected(node);
-
-            if (fireSelectionChanged) {
-                Main.main.getCurrentDataSet().setSelected(selected);
-            }
+        }
+
+        // CurrentDataSet may be null if there is no normal, edible map
+        // If so, a temporary DataSet is created because it's the simplest way
+        // to fire all necessary events so OSB updates its popups.
+        DataSet ds = Main.main.getCurrentDataSet();
+        if (fireSelectionChanged) {
+            if(ds == null)
+                ds = new DataSet();
+            ds.setSelected(selected);
         }
     }
@@ -230,5 +235,5 @@
         for (int i = 0; i < model.getSize(); i++) {
             Node current = ((OsbListItem) model.get(i)).getNode();
-            if (current.id == node.id) {
+            if (current.getId()== node.getId()) {
                 list.scrollRectToVisible(list.getCellBounds(i, i));
                 list.setSelectedIndex(i);
@@ -320,12 +325,12 @@
         });
     }
-    
-	@Override
-	public void showDialog() {
-		if (!downloaded) {
-			initialDownload();
-			downloaded = true;
-		}
-		super.showDialog();
-	}
+
+    @Override
+    public void showDialog() {
+        if (!downloaded) {
+            initialDownload();
+            downloaded = true;
+        }
+        super.showDialog();
+    }
 }
Index: applications/editors/josm/plugins/openstreetbugs/src/org/openstreetmap/josm/plugins/osb/gui/OsbListItem.java
===================================================================
--- applications/editors/josm/plugins/openstreetbugs/src/org/openstreetmap/josm/plugins/osb/gui/OsbListItem.java	(revision 17519)
+++ applications/editors/josm/plugins/openstreetbugs/src/org/openstreetmap/josm/plugins/osb/gui/OsbListItem.java	(revision 17520)
@@ -63,5 +63,5 @@
             OsbListItem other = (OsbListItem)obj;
             if(getNode() != null && other.getNode() != null) {
-                return getNode().id == other.getNode().id;
+                return getNode().getId() == other.getNode().getId();
             }
         }
