Index: trunk/src/org/openstreetmap/josm/actions/UpdateSelectionAction.java
===================================================================
--- trunk/src/org/openstreetmap/josm/actions/UpdateSelectionAction.java	(revision 2470)
+++ trunk/src/org/openstreetmap/josm/actions/UpdateSelectionAction.java	(revision 2471)
@@ -10,4 +10,5 @@
 import java.util.Collection;
 import java.util.Collections;
+import java.util.logging.Logger;
 
 import javax.swing.JOptionPane;
@@ -138,4 +139,6 @@
      */
     static class UpdatePrimitivesTask extends PleaseWaitRunnable {
+        static private final Logger logger = Logger.getLogger(UpdatePrimitivesTask.class.getName());
+
         private DataSet ds;
         private boolean canceled;
@@ -144,4 +147,8 @@
         private MultiFetchServerObjectReader reader;
 
+        /**
+         * 
+         * @param toUpdate a collection of primitives to update from the server
+         */
         public UpdatePrimitivesTask(Collection<? extends OsmPrimitive> toUpdate) {
             super(tr("Update objects"), false /* don't ignore exception*/);
@@ -166,7 +173,7 @@
                 return;
             }
-            if (ds != null) {
-                Main.map.mapView.getEditLayer().mergeFrom(ds);
-                Main.map.mapView.getEditLayer().onPostDownloadFromServer();
+            if (ds != null && Main.main.getEditLayer() != null) {
+                Main.main.getEditLayer().mergeFrom(ds);
+                Main.main.getEditLayer().onPostDownloadFromServer();
             }
         }
@@ -202,4 +209,5 @@
             }
         }
+
 
         @Override
Index: trunk/src/org/openstreetmap/josm/data/osm/DataSetMerger.java
===================================================================
--- trunk/src/org/openstreetmap/josm/data/osm/DataSetMerger.java	(revision 2470)
+++ trunk/src/org/openstreetmap/josm/data/osm/DataSetMerger.java	(revision 2471)
@@ -83,7 +83,7 @@
             if (mergeById(source))
                 return;
-            if (!source.isVisible())
-                // ignore it
-                return;
+            //if (!source.isVisible())
+            // ignore it
+            //    return;
         } else {
             // try to merge onto a primitive  which has no id assigned
@@ -236,5 +236,5 @@
      * Tries to merge a primitive <code>source</code> into an existing primitive with the same id.
      *
-     * @param source  the other primitive which is to be merged onto a primitive in my primitives
+     * @param source  the source primitive which is to be merged into a target primitive
      * @return true, if this method was able to merge <code>source</code> into a target object; false, otherwise
      */
Index: trunk/src/org/openstreetmap/josm/data/osm/User.java
===================================================================
--- trunk/src/org/openstreetmap/josm/data/osm/User.java	(revision 2470)
+++ trunk/src/org/openstreetmap/josm/data/osm/User.java	(revision 2471)
@@ -7,4 +7,5 @@
 import java.util.HashMap;
 import java.util.List;
+import java.util.concurrent.atomic.AtomicLong;
 
 /**
@@ -18,5 +19,7 @@
  */
 public class User {
-    static private long uidCounter = 0;
+
+    static private AtomicLong uidCounter = new AtomicLong();
+
     /**
      * the map of known users
@@ -27,6 +30,5 @@
     private static long getNextLocalUid() {
         synchronized(User.class) {
-            uidCounter--;
-            return uidCounter;
+            return uidCounter.decrementAndGet();
         }
     }
@@ -60,4 +62,11 @@
     }
 
+    /**
+     * clears the static map of user ids to user objects
+     * 
+     */
+    public static void clearUserMap() {
+        userMap.clear();
+    }
 
     /**
