Index: /trunk/src/org/openstreetmap/josm/gui/dialogs/ConflictDialog.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/gui/dialogs/ConflictDialog.java	(revision 2929)
+++ /trunk/src/org/openstreetmap/josm/gui/dialogs/ConflictDialog.java	(revision 2930)
@@ -165,4 +165,13 @@
         conflicts = editLayer == null?new ConflictCollection():editLayer.getConflicts();
         model.fireContentChanged();
+        updateTitle(conflicts.size());
+    }
+
+    private void updateTitle(int conflictsCount) {
+        if (conflictsCount > 0) {
+            setTitle(tr("Conflicts: {0} unresolved", conflicts.size()));
+        } else {
+            setTitle(tr("Conflict"));
+        }
     }
 
Index: /trunk/src/org/openstreetmap/josm/gui/dialogs/ConflictResolutionDialog.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/gui/dialogs/ConflictResolutionDialog.java	(revision 2929)
+++ /trunk/src/org/openstreetmap/josm/gui/dialogs/ConflictResolutionDialog.java	(revision 2930)
@@ -21,4 +21,5 @@
 import javax.swing.JOptionPane;
 import javax.swing.JPanel;
+import javax.swing.WindowConstants;
 
 import org.openstreetmap.josm.Main;
@@ -43,4 +44,6 @@
     private ConflictResolver resolver;
 
+    private ApplyResolutionAction applyResolutionAction;
+
     /**
      * restore position and size on screen from preference settings
@@ -95,4 +98,10 @@
         Main.pref.put("conflictresolutiondialog.width", Integer.toString(d.width));
         Main.pref.put("conflictresolutiondialog.height", Integer.toString(d.height));
+    }
+
+    @Override
+    public void removeNotify() {
+        super.removeNotify();
+        unregisterListeners();
     }
 
@@ -104,6 +113,12 @@
         } else {
             rememberPositionAndDimension();
+            unregisterListeners();
         }
         super.setVisible(isVisible);
+    }
+
+    private void closeDialog() {
+        setVisible(false);
+        dispose();
     }
 
@@ -117,6 +132,5 @@
         pnl.setLayout(new FlowLayout(FlowLayout.CENTER));
 
-        ApplyResolutionAction applyResolutionAction = new ApplyResolutionAction();
-        resolver.addPropertyChangeListener(applyResolutionAction);
+        applyResolutionAction = new ApplyResolutionAction();
         JButton btn = new JButton(applyResolutionAction);
         btn.setName("button.apply");
@@ -135,8 +149,17 @@
     }
 
+    private void registerListeners() {
+        resolver.addPropertyChangeListener(applyResolutionAction);
+    }
+
+    private void unregisterListeners() {
+        resolver.removePropertyChangeListener(applyResolutionAction);
+    }
+
     /**
      * builds the GUI
      */
     protected void build() {
+        setDefaultCloseOperation(WindowConstants.DISPOSE_ON_CLOSE);
         updateTitle();
         getContentPane().setLayout(new BorderLayout());
@@ -149,4 +172,6 @@
         resolver.addPropertyChangeListener(this);
         HelpUtil.setHelpContext(this.getRootPane(), "Dialog/ConflictDialog");
+
+        registerListeners();
     }
 
@@ -172,5 +197,5 @@
 
         public void actionPerformed(ActionEvent arg0) {
-            setVisible(false);
+            closeDialog();
         }
     }
@@ -231,5 +256,5 @@
                 switch(ret) {
                 case JOptionPane.YES_OPTION:
-                    setVisible(false);
+                    closeDialog();
                     break;
                 default:
@@ -240,5 +265,5 @@
                 Command cmd = resolver.buildResolveCommand();
                 Main.main.undoRedo.add(cmd);
-                setVisible(false);
+                closeDialog();
             } catch(OperationCancelledException e) {
                 // do nothing. Exception already reported
Index: /trunk/src/org/openstreetmap/josm/gui/dialogs/SelectionListDialog.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/gui/dialogs/SelectionListDialog.java	(revision 2929)
+++ /trunk/src/org/openstreetmap/josm/gui/dialogs/SelectionListDialog.java	(revision 2930)
@@ -174,4 +174,5 @@
         SelectionEventManager.getInstance().removeSelectionListener(this);
         MapView.removeEditLayerChangeListener(this);
+        updateTitle(0, 0, 0);
     }
 
@@ -274,9 +275,5 @@
         }
 
-        if( (nodes+ways+relations) != 0) {
-            setTitle(tr("Sel.: Rel.:{0} / Ways:{1} / Nodes:{2}", relations, ways, nodes));
-        } else {
-            setTitle(tr("Selection"));
-        }
+        updateTitle(nodes, ways, relations);
 
         if (selectionHistory != null && newSelection.size() > 0 && !newSelection.equals(historyIgnoreSelection)) {
@@ -293,4 +290,12 @@
                 selectionHistory.removeLast();
             }
+        }
+    }
+
+    private void updateTitle(int nodes, int ways, int relations) {
+        if( (nodes+ways+relations) != 0) {
+            setTitle(tr("Sel.: Rel.:{0} / Ways:{1} / Nodes:{2}", relations, ways, nodes));
+        } else {
+            setTitle(tr("Selection"));
         }
     }
Index: /trunk/src/org/openstreetmap/josm/tools/CopyList.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/tools/CopyList.java	(revision 2929)
+++ /trunk/src/org/openstreetmap/josm/tools/CopyList.java	(revision 2930)
@@ -130,5 +130,5 @@
 
     private void rangeCheck(int index) {
-        if (index >= size || index < 0) throw new IndexOutOfBoundsException();
+        if (index >= size || index < 0) throw new IndexOutOfBoundsException("Index:" + index + " Size:" + size);
     }
 
