Index: /applications/editors/josm/plugins/mapdust/src/org/openstreetmap/josm/plugins/mapdust/MapdustLayer.java
===================================================================
--- /applications/editors/josm/plugins/mapdust/src/org/openstreetmap/josm/plugins/mapdust/MapdustLayer.java	(revision 25753)
+++ /applications/editors/josm/plugins/mapdust/src/org/openstreetmap/josm/plugins/mapdust/MapdustLayer.java	(revision 25754)
@@ -89,4 +89,17 @@
 
     /**
+     * Updates the <code>MapdustLayer</code> with the new
+     * <code>MapdustGUI</code> and <code>MapdustBug</code> list.
+     *
+     * @param mapdustGUI The <code>MapdustGUI</code>
+     * @param mapdustBugList The <code>MapdustBug</code> list
+     */
+    public void update(MapdustGUI mapdustGUI, List<MapdustBug> mapdustBugList) {
+        this.mapdustGUI = mapdustGUI;
+        this.mapdustBugList = mapdustBugList;
+        this.bugSelected = null;
+    }
+
+    /**
      * Returns the icon of the MapDust layer.
      *
@@ -169,5 +182,5 @@
     public void paint(Graphics2D g, MapView mv, Bounds bounds) {
         JToolTip tooltip = new JToolTip();
-        if (mapdustBugList != null && mapdustBugList.size()>0) {
+        if (mapdustBugList != null && mapdustBugList.size() > 0) {
             /* draw the current visible bugs */
             for (MapdustBug bug : mapdustBugList) {
@@ -203,5 +216,5 @@
             MapdustBug bugSelected = getMapdustGUI().getSelectedBug();
             if (bugSelected == null) {
-                    bugSelected = clickedBug;
+                bugSelected = clickedBug;
             }
             setBugSelected(bugSelected);
Index: /applications/editors/josm/plugins/mapdust/src/org/openstreetmap/josm/plugins/mapdust/MapdustPlugin.java
===================================================================
--- /applications/editors/josm/plugins/mapdust/src/org/openstreetmap/josm/plugins/mapdust/MapdustPlugin.java	(revision 25753)
+++ /applications/editors/josm/plugins/mapdust/src/org/openstreetmap/josm/plugins/mapdust/MapdustPlugin.java	(revision 25754)
@@ -418,12 +418,5 @@
      */
     @Override
-    public void layerAdded(Layer layer) {
-        if (layer instanceof MapdustLayer) {
-            /* download the MapDust bugs and update the plugin */
-            if (mapdustBugList == null) {
-                updatePluginData();
-            }
-        }
-    }
+    public void layerAdded(Layer layer) {}
 
     /**
@@ -508,7 +501,6 @@
     private BoundingBox getBBox() {
         MapView mapView = Main.map.mapView;
-        Bounds bounds =
-                new Bounds(mapView.getLatLon(0, mapView.getHeight()),
-                        mapView.getLatLon(mapView.getWidth(), 0));
+        Bounds bounds = new Bounds(mapView.getLatLon(0, mapView.getHeight()),
+                mapView.getLatLon(mapView.getWidth(), 0));
         return new BoundingBox(bounds.getMin().lon(), bounds.getMin().lat(),
                 bounds.getMax().lon(), bounds.getMax().lat());
@@ -522,5 +514,4 @@
     private void updatePluginData() {
         Main.worker.execute(new Runnable() {
-
             @Override
             public void run() {
@@ -549,5 +540,4 @@
             /* update the view */
             SwingUtilities.invokeLater(new Runnable() {
-
                 @Override
                 public void run() {
@@ -562,4 +552,5 @@
     }
 
+
     /**
      * Updates the current view ( map and MapDust bug list), with the given list
@@ -567,26 +558,52 @@
      */
     protected void updateView() {
-        /* update the dialog with the new data */
-        mapdustGUI.update(mapdustBugList, this);
-        /* update the MapdustLayer */
-        if (mapdustLayer == null) {
-            /* create and add the layer */
-            mapdustLayer =
-                    new MapdustLayer("MapDust", mapdustGUI, mapdustBugList);
-            Main.main.addLayer(this.mapdustLayer);
-            Main.map.mapView.moveLayer(this.mapdustLayer, 0);
-            Main.map.mapView.addMouseListener(this);
-            NavigatableComponent.addZoomChangeListener(this);
-        } else {
-            /* re-set the properties */
-            mapdustLayer.destroy();
-            mapdustLayer.setMapdustGUI(mapdustGUI);
-            mapdustLayer.setMapdustBugList(mapdustBugList);
-            mapdustLayer.setBugSelected(null);
-        }
-        /* repaint */
-        mapdustGUI.revalidate();
-        Main.map.mapView.revalidate();
-        Main.map.repaint();
+        if (Main.map != null && Main.map.mapView != null) {
+            /* update the MapdustLayer */
+            boolean needRepaint = false;
+            if (!containsMapdustLayer()) {
+                /* first start or layer was deleted */
+                if (mapdustGUI.isDownloaded()) {
+                    mapdustGUI.update(mapdustBugList, this);
+                    /* create and add the layer */
+                    mapdustLayer = new MapdustLayer("MapDust", mapdustGUI,
+                            mapdustBugList);
+                    Main.main.addLayer(this.mapdustLayer);
+                    Main.map.mapView.moveLayer(this.mapdustLayer, 0);
+                    Main.map.mapView.addMouseListener(this);
+                    NavigatableComponent.addZoomChangeListener(this);
+                    needRepaint = true;
+                }
+            } else {
+                if (mapdustLayer != null) {
+                    /* MapDust data was changed */
+                    mapdustGUI.update(mapdustBugList, this);
+                    mapdustLayer.destroy();
+                    mapdustLayer.update(mapdustGUI, mapdustBugList);
+                    needRepaint = true;
+                }
+            }
+            if (needRepaint) {
+                /* force repaint */
+                mapdustGUI.revalidate();
+                Main.map.mapView.revalidate();
+                Main.map.repaint();
+            }
+        }
+    }
+
+    /**
+     * Verifies if the <code>MapView</code> contains or not the
+     * <code>MapdustLayer</code> layer.
+     *
+     * @return true if the <code>MapView</code> contains the
+     * <code>MapdustLayer</code> false otherwise
+     */
+    private boolean containsMapdustLayer() {
+        boolean contains = false;
+        List<Layer> all = Main.map.mapView.getAllLayersAsList();
+        if (mapdustLayer != null && all.contains(mapdustLayer)) {
+            contains = true;
+        }
+        return contains;
     }
 
Index: /applications/editors/josm/plugins/mapdust/src/org/openstreetmap/josm/plugins/mapdust/gui/MapdustGUI.java
===================================================================
--- /applications/editors/josm/plugins/mapdust/src/org/openstreetmap/josm/plugins/mapdust/gui/MapdustGUI.java	(revision 25753)
+++ /applications/editors/josm/plugins/mapdust/src/org/openstreetmap/josm/plugins/mapdust/gui/MapdustGUI.java	(revision 25754)
@@ -96,7 +96,4 @@
     private boolean downloaded = false;
 
-    /** Specifies if the MapDust layer was or not before deleted */
-    boolean wasDeleted = false;
-
     /**
      * Builds a <code>MapdustGUi</code> based on the given parameters.
@@ -125,8 +122,4 @@
             notifyObservers(null, true);
             downloaded = true;
-        }
-        if (wasDeleted) {
-            notifyObservers(null, true);
-            wasDeleted = false;
         }
         super.showDialog();
@@ -147,12 +140,27 @@
             mainPanel = null;
             panel = null;
+            actionPanel = null;
         } else {
             /* from online to offline */
-            remove(mainPanel);
-            mainPanel = null;
-            panel = null;
-        }
-        wasDeleted = true;
+            if (mainPanel != null) {
+                remove(mainPanel);
+                mainPanel = null;
+                panel = null;
+                detailsPanel = null;
+            }
+        }
+        downloaded = false;
+        button.setSelected(false);
         super.destroy();
+    }
+
+    @Override
+    protected void toggleButtonHook() {
+        if (isVisible()) {
+            setVisible(false);
+            button.setSelected(false);
+        } else {
+            setVisible(true);
+        }
     }
 
@@ -168,13 +176,11 @@
         actionList.add(action);
         List<MapdustBug> mapdustBugs = panel.getMapdustBugsList();
-        boolean showBug =
-                shouldDisplay(action.getMapdustBug(), mapdustPlugin.getFilter());
+        boolean showBug = shouldDisplay(action.getMapdustBug(),
+                mapdustPlugin.getFilter());
         mapdustBugs = modifyBug(mapdustBugs, action.getMapdustBug(), showBug);
-
         /* update panels */
         updateMapdustPanel(mapdustBugs);
         updateMapdustActionPanel(actionList);
-        if (showBug
-                && !action.getCommand().equals(MapdustServiceCommand.ADD_BUG)) {
+        if (showBug && !action.getCommand().equals(MapdustServiceCommand.ADD_BUG)) {
             panel.resetSelectedBug(0);
         } else {
@@ -246,7 +252,6 @@
 
             /* update panels */
-            List<MapdustBug> bugs =
-                    filterMapdustBugList(mapdustBugs, actionList,
-                            mapdustPlugin.getFilter());
+            List<MapdustBug> bugs = filterMapdustBugList(mapdustBugs,
+                    actionList,mapdustPlugin.getFilter());
             updateMapdustPanel(bugs);
             updateMapdustActionPanel(actionList);
@@ -256,5 +261,4 @@
         }
     }
-
 
     /**
@@ -272,7 +276,6 @@
         }
         if (panel == null) {
-            panel =
-                    new MapdustBugListPanel(mapdustBugs, "Bug reports",
-                            mapdustPlugin);
+            panel = new MapdustBugListPanel(mapdustBugs, "Bug reports",
+                    mapdustPlugin);
             panel.addObserver(detailsPanel);
         } else {
@@ -289,7 +292,6 @@
     private void updateMapdustActionPanel(List<MapdustAction> actionList) {
         if (actionPanel == null) {
-            actionPanel =
-                    new MapdustActionPanel(actionList, "Offline Contribution",
-                            mapdustPlugin);
+            actionPanel = new MapdustActionPanel(actionList,
+                    "Offline Contribution", mapdustPlugin);
         } else {
             actionPanel.updateComponents(actionList);
@@ -446,4 +448,5 @@
     }
 
+
     /**
      * Adds a new MapDust bug details observer to the list of observers.
@@ -516,5 +519,5 @@
                 this.initialUpdateObservers.iterator();
         while (elements.hasNext()) {
-            (elements.next()).update(null, true);
+            (elements.next()).update(filter, first);
         }
     }
@@ -552,3 +555,12 @@
     }
 
+    /**
+     * Returns the downloaded flag
+     *
+     * @return the downloaded
+     */
+    public boolean isDownloaded() {
+        return downloaded;
+    }
+
 }
Index: /applications/editors/josm/plugins/mapdust/src/org/openstreetmap/josm/plugins/mapdust/gui/component/panel/MapdustButtonPanel.java
===================================================================
--- /applications/editors/josm/plugins/mapdust/src/org/openstreetmap/josm/plugins/mapdust/gui/component/panel/MapdustButtonPanel.java	(revision 25753)
+++ /applications/editors/josm/plugins/mapdust/src/org/openstreetmap/josm/plugins/mapdust/gui/component/panel/MapdustButtonPanel.java	(revision 25754)
@@ -112,10 +112,9 @@
                 imagePath = "dialogs/online.png";
             }
-            AbstractAction action =
-                    new ExecuteWorkOffline(mapdustPlugin.getMapdustGUI());
+            AbstractAction action = new ExecuteWorkOffline(
+                    mapdustPlugin.getMapdustGUI());
             ((ExecuteWorkOffline) action).addObserver(mapdustPlugin);
-            btnWorkOffline =
-                    ComponentUtil.createJButton("Work offline", tooltipText,
-                            imagePath, action);
+            btnWorkOffline = ComponentUtil.createJButton("Work offline",
+                    tooltipText, imagePath, action);
             btnWorkOffline.setSelected(false);
             btnWorkOffline.setFocusTraversalKeysEnabled(false);
@@ -124,8 +123,7 @@
         if (btnFilter == null) {
             AbstractAction action = new ShowFilterBugAction(mapdustPlugin);
-            btnFilter =
-                    ComponentUtil.createJButton("Filter bug reports",
-                            "Filter bug reports",
-                            "dialogs/mapdust_bug_filter.png", action);
+            btnFilter = ComponentUtil.createJButton("Filter bug reports",
+                    "Filter bug reports", "dialogs/mapdust_bug_filter.png",
+                    action);
             btnFilter.setEnabled(true);
             btnFilter.setFocusTraversalKeysEnabled(false);
@@ -134,9 +132,6 @@
         if (btnAddComment == null) {
             AbstractAction action = new ShowCommentBugAction(mapdustPlugin);
-            btnAddComment =
-                    ComponentUtil
-                            .createJButton("Comment bug report",
-                                    "Comment bug report",
-                                    "dialogs/comment.png", action);
+            btnAddComment = ComponentUtil.createJButton("Comment bug report",
+                    "Comment bug report", "dialogs/comment.png", action);
             btnAddComment.setEnabled(false);
             btnAddComment.setFocusTraversalKeysEnabled(false);
@@ -145,7 +140,6 @@
         if (btnFixBugReport == null) {
             AbstractAction action = new ShowCloseBugAction(mapdustPlugin);
-            btnFixBugReport =
-                    ComponentUtil.createJButton("Close bug report",
-                            "Close bug report", "dialogs/fixed.png", action);
+            btnFixBugReport = ComponentUtil.createJButton("Close bug report",
+                    "Close bug report", "dialogs/fixed.png", action);
             btnFixBugReport.setEnabled(false);
             btnFixBugReport.setFocusTraversalKeysEnabled(false);
@@ -154,8 +148,7 @@
         if (btnInvalidateBugReport == null) {
             AbstractAction action = new ShowInvalidateBugAction(mapdustPlugin);
-            btnInvalidateBugReport =
-                    ComponentUtil.createJButton("Invalidate bug report",
-                            "Invalidate bug report", "dialogs/invalid.png",
-                            action);
+            btnInvalidateBugReport = ComponentUtil.createJButton(
+                    "Invalidate bug report", "Invalidate bug report",
+                    "dialogs/invalid.png", action);
             btnInvalidateBugReport.setEnabled(false);
             btnInvalidateBugReport.setFocusTraversalKeysEnabled(false);
@@ -164,7 +157,7 @@
         if (btnReOpenBugReport == null) {
             AbstractAction action = new ShowReOpenBugAction(mapdustPlugin);
-            btnReOpenBugReport =
-                    ComponentUtil.createJButton("Re-open bug report",
-                            "Re-open bug report", "dialogs/reopen.png", action);
+            btnReOpenBugReport = ComponentUtil.createJButton(
+                    "Re-open bug report", "Re-open bug report",
+                    "dialogs/reopen.png", action);
             btnReOpenBugReport.setEnabled(false);
             btnReOpenBugReport.setFocusTraversalKeysEnabled(false);
@@ -175,7 +168,6 @@
             AbstractAction action = new ExecuteRefresh();
             ((ExecuteRefresh) action).addObserver(mapdustPlugin);
-            btnRefresh =
-                    ComponentUtil.createJButton("Refresh", "Refresh",
-                            "dialogs/mapdust_refresh.png", action);
+            btnRefresh = ComponentUtil.createJButton("Refresh", "Refresh",
+                    "dialogs/mapdust_refresh.png", action);
             if (pluginState.equals(MapdustPluginState.OFFLINE.getValue())) {
                 btnRefresh.setEnabled(false);
@@ -241,5 +233,5 @@
      * other buttons will be disabled.
      *
-     * @param onlyBasic If true then the not basic buttons will be disabled
+     * @param onlyBasic If true then the not basic buttons will be enabled
      */
     public void enableBasicComponents(boolean onlyBasic) {
Index: /applications/editors/josm/plugins/mapdust/src/org/openstreetmap/josm/plugins/mapdust/gui/component/panel/MapdustDescriptionPanel.java
===================================================================
--- /applications/editors/josm/plugins/mapdust/src/org/openstreetmap/josm/plugins/mapdust/gui/component/panel/MapdustDescriptionPanel.java	(revision 25753)
+++ /applications/editors/josm/plugins/mapdust/src/org/openstreetmap/josm/plugins/mapdust/gui/component/panel/MapdustDescriptionPanel.java	(revision 25754)
@@ -80,14 +80,13 @@
      */
     private void addComponents(String description) {
-        if (description != null && !description.isEmpty()) {
-            JTextArea txtDescription = new JTextArea(description);
-            txtDescription.setLineWrap(true);
-            txtDescription.setFont(new Font("Times New Roman", Font.BOLD, 12));
-            txtDescription.setEditable(false);
-            JScrollPane cmpDescription = ComponentUtil.createJScrollPane(
-                    txtDescription, null, Color.white, true, true);
-            cmpDescription.setPreferredSize(new Dimension(100, 100));
-            add(cmpDescription, BorderLayout.CENTER);
-        }
+        description = (description != null ? description : "");
+        JTextArea txtDescription = new JTextArea(description);
+        txtDescription.setLineWrap(true);
+        txtDescription.setFont(new Font("Times New Roman", Font.BOLD, 12));
+        txtDescription.setEditable(false);
+        JScrollPane cmpDescription = ComponentUtil.createJScrollPane(
+                txtDescription, null, Color.white, true, true);
+        cmpDescription.setPreferredSize(new Dimension(100, 100));
+        add(cmpDescription, BorderLayout.CENTER);
     }
 
Index: /applications/editors/josm/plugins/mapdust/src/org/openstreetmap/josm/plugins/mapdust/gui/observer/MapdustUpdateObserver.java
===================================================================
--- /applications/editors/josm/plugins/mapdust/src/org/openstreetmap/josm/plugins/mapdust/gui/observer/MapdustUpdateObserver.java	(revision 25753)
+++ /applications/editors/josm/plugins/mapdust/src/org/openstreetmap/josm/plugins/mapdust/gui/observer/MapdustUpdateObserver.java	(revision 25754)
@@ -47,5 +47,7 @@
      * Updates the MapDust bugs based on the given filters. If the initialUpdate
      * flag is true then the filters will not be applied to the MapDust bug
-     * data.
+     * data. The initialUpdate flag can be true in one the following cases:
+     * 1) After JOSM startup , 2) If the MapDust layer was re-added after a
+     * previous deletion.
      *
      * @param filter The <code>MapdustBugFilter</code> object
