Index: src/UIElements/Views/Qt4/Qt3D/GLWorldScene.cpp
===================================================================
--- src/UIElements/Views/Qt4/Qt3D/GLWorldScene.cpp	(revision 6c16a02ecd71315045f7522510b3807789050e4b)
+++ src/UIElements/Views/Qt4/Qt3D/GLWorldScene.cpp	(revision 20f9b5ca3d0b9027b2885d6239e5b48b8dea45a5)
@@ -223,4 +223,12 @@
   ASSERT( iter == MoleculesinSceneMap.end(),
       "GLWorldScene::moleculeInserted() - molecule's id "+toString(_id)+" already present.");
+
+  // check whether molecule is still present
+  if (RemovalMolecules.count(_id) != 0) {
+    RemovalMolecules.erase(_id);
+    return;
+  }
+  if (const_cast<const World &>(World::getInstance()).getMolecule(MoleculeById(_id)) == NULL)
+    return;
 
   // add new object
@@ -301,4 +309,5 @@
   connect (molObject, SIGNAL(hoverChanged(const atomId_t)), this, SIGNAL(hoverChanged(const atomId_t)));
   connect (molObject, SIGNAL(hoverChanged(const moleculeId_t, int)), this, SIGNAL(hoverChanged(const moleculeId_t, int)));
+  connect (molObject, SIGNAL(indexChanged(GLMoleculeObject_molecule *, const moleculeId_t, const moleculeId_t)), this, SLOT(changeMoleculeId(GLMoleculeObject_molecule *, const moleculeId_t, const moleculeId_t)));
 
   emit changed();
@@ -314,11 +323,12 @@
   LOG(3, "INFO: GLWorldScene: Received signal moleculeRemoved for molecule "+toString(_id)+".");
   MoleculeNodeMap::iterator iter = MoleculesinSceneMap.find(_id);
-  ASSERT( iter != MoleculesinSceneMap.end(),
-      "GLWorldScene::moleculeInserted() - molecule's id "+toString(_id)+" is unknown.");
-
-  GLMoleculeObject_molecule *molObject = iter->second;
-  molObject->disconnect();
-  MoleculesinSceneMap.erase(iter);
-  delete molObject;
+  if ( iter == MoleculesinSceneMap.end())
+    RemovalMolecules.insert(_id);
+  else {
+
+    GLMoleculeObject_molecule *molObject = iter->second;
+    molObject->disconnect();
+    MoleculesinSceneMap.erase(iter);
+    delete molObject;
 
   // remove any possible state changes left
@@ -328,6 +338,7 @@
   }
 
-  emit changed();
-  emit changeOccured();
+    emit changed();
+    emit changeOccured();
+  }
 }
 
@@ -415,2 +426,39 @@
   setSelectionMode(SelectMolecule);
 }
+
+void GLWorldScene::changeMoleculeId(
+    GLMoleculeObject_molecule *ob,
+    const moleculeId_t oldId,
+    const moleculeId_t newId)
+{
+  LOG(3, "INFO: GLWorldScene - change molecule id " << oldId << " to " << newId << ".");
+
+  {
+    // Remove from map.
+    MoleculeNodeMap::iterator iter = MoleculesinSceneMap.find(oldId);
+    ASSERT(iter != MoleculesinSceneMap.end(),
+        "GLWorldScene::changeMoleculeId() - molecule with old id "+toString(oldId)+" not on display.");
+    ASSERT(iter->second == ob,
+        "GLWorldScene::changeMoleculeId() - molecule with id "
+        +toString(oldId)+" does not match with object in MoleculesinSceneMap.");
+    MoleculesinSceneMap.erase(iter);
+
+    // Reinsert with new id.
+    {
+      MoleculeNodeMap::iterator iter = MoleculesinSceneMap.find(newId);
+      ASSERT(iter == MoleculesinSceneMap.end(),
+            "GLWorldScene::changeMoleculeId() -  moleculewith new id "+toString(newId)+" already known.");
+    }
+    MoleculesinSceneMap.insert( make_pair(newId, ob) );
+  }
+
+  {
+    // Remove and re-insert from map if present.
+    MoleculeMissedStateMap_t::iterator iter = MoleculeMissedStateMap.find(oldId);
+    if (iter != MoleculeMissedStateMap.end()) {
+      StateChangeMap_t changemap = iter->second;
+      MoleculeMissedStateMap.erase(iter);
+      MoleculeMissedStateMap.insert( std::make_pair(newId, changemap) );
+    }
+  }
+}
Index: src/UIElements/Views/Qt4/Qt3D/GLWorldScene.hpp
===================================================================
--- src/UIElements/Views/Qt4/Qt3D/GLWorldScene.hpp	(revision 6c16a02ecd71315045f7522510b3807789050e4b)
+++ src/UIElements/Views/Qt4/Qt3D/GLWorldScene.hpp	(revision 20f9b5ca3d0b9027b2885d6239e5b48b8dea45a5)
@@ -93,4 +93,5 @@
   void update();
   void moleculesVisibilityChanged(const moleculeId_t _id, bool _visible);
+  void changeMoleculeId(GLMoleculeObject_molecule *, const moleculeId_t, const moleculeId_t);
 
 public:
@@ -98,4 +99,8 @@
 
 private:
+
+  typedef std::set<moleculeId_t> RemovalMolecule_t;
+  //!> list of molecule ids whose moleculeRemoved we have received but who have not been inserted yet
+  RemovalMolecule_t RemovalMolecules;
 
   typedef std::map< moleculeId_t , GLMoleculeObject_molecule* > MoleculeNodeMap;
Index: src/UIElements/Views/Qt4/Qt3D/GLWorldView.cpp
===================================================================
--- src/UIElements/Views/Qt4/Qt3D/GLWorldView.cpp	(revision 6c16a02ecd71315045f7522510b3807789050e4b)
+++ src/UIElements/Views/Qt4/Qt3D/GLWorldView.cpp	(revision 20f9b5ca3d0b9027b2885d6239e5b48b8dea45a5)
@@ -92,6 +92,6 @@
   connect(this, SIGNAL(atomRemoved(const moleculeId_t, const atomId_t)), worldscene, SLOT(atomRemoved(const moleculeId_t, const atomId_t)), Qt::DirectConnection);
   connect(this, SIGNAL(atomInserted(const moleculeId_t, const atomId_t)), worldscene, SLOT(atomInserted(const moleculeId_t, const atomId_t)), Qt::DirectConnection);
+  connect(this, SIGNAL(moleculeInserted(const moleculeId_t)), worldscene, SLOT(moleculeInserted(const moleculeId_t)), Qt::DirectConnection);
   connect(this, SIGNAL(moleculeRemoved(const moleculeId_t)), worldscene, SLOT(moleculeRemoved(const moleculeId_t)), Qt::DirectConnection);
-  connect(this, SIGNAL(moleculeInserted(const moleculeId_t)), worldscene, SLOT(moleculeInserted(const moleculeId_t)), Qt::DirectConnection);
   //connect(this, SIGNAL(changed()), this, SLOT(updateGL()));
   connect(this, SIGNAL(changed()), this, SLOT(sceneChangeSignalled()));
