diff --git a/objectstore/Agent.cpp b/objectstore/Agent.cpp
index 545f241b4807d2b3a65b174e9eb706dfe65601d0..679ba05743dea76b161c2c506e88edbbf429cd18 100644
--- a/objectstore/Agent.cpp
+++ b/objectstore/Agent.cpp
@@ -70,7 +70,7 @@ void cta::objectstore::Agent::insertAndRegisterSelf() {
   arLock.release();
 }
 
-void cta::objectstore::Agent::removeAndUnregisterSelf() {
+void cta::objectstore::Agent::removeAndUnregisterSelf(log::LogContext & lc) {
   // Check that we own the proper lock
   checkPayloadWritable();
   // Check that we are not empty
@@ -85,13 +85,14 @@ void cta::objectstore::Agent::removeAndUnregisterSelf() {
   }
   // First delete ourselves
   remove();
+  log::ScopedParamContainer params(lc);
+  params.add("agentObject", getAddressIfSet());
+  lc.log(log::INFO, "In Agent::removeAndUnregisterSelf(): Removed agent object.");
   // Then we remove the dangling pointer about ourselves in the agent register.
   // We need to get hold of the agent register, which we suppose is available
   RootEntry re(m_objectStore);
-  ScopedSharedLock reLock(re);
-  re.fetch();
+  re.fetchNoLock();
   AgentRegister ar(re.getAgentRegisterAddress(), m_objectStore);
-  reLock.release();
   // Then we should first create a pointer to our agent
   ScopedExclusiveLock arLock(ar);
   ar.fetch();
diff --git a/objectstore/Agent.hpp b/objectstore/Agent.hpp
index e4649908542023656a81a0bc71ab5a1f4220ac57..67b45820f38731d514ea2ae7d4649aac32c8aac2 100644
--- a/objectstore/Agent.hpp
+++ b/objectstore/Agent.hpp
@@ -52,7 +52,7 @@ public:
 
   void insertAndRegisterSelf();
   
-  void removeAndUnregisterSelf();
+  void removeAndUnregisterSelf(log::LogContext & lc);
   
   bool isEmpty();
   
diff --git a/objectstore/BackendPopulator.cpp b/objectstore/BackendPopulator.cpp
index e1dd631f4d708ec6791707a0f370ad4de56fd0b2..95f5067d6bf501bc553064b0f8b3012d2c68d73f 100644
--- a/objectstore/BackendPopulator.cpp
+++ b/objectstore/BackendPopulator.cpp
@@ -62,7 +62,7 @@ BackendPopulator::~BackendPopulator() throw() {
     Agent agent(m_agentReference.getAgentAddress(), m_backend);
     cta::objectstore::ScopedExclusiveLock agl(agent);
     agent.fetch();
-    agent.removeAndUnregisterSelf();
+    agent.removeAndUnregisterSelf(m_lc);
   } catch (cta::exception::Exception & ex) {
     cta::log::ScopedParamContainer params(m_lc);
     params.add("errorMessage", ex.getMessageValue());
diff --git a/objectstore/GarbageCollector.cpp b/objectstore/GarbageCollector.cpp
index eeeaa758301f590faaddcab9498c182eb92cd699..7c7d1909e8992d39b045ff589f07cc6eaa42d12d 100644
--- a/objectstore/GarbageCollector.cpp
+++ b/objectstore/GarbageCollector.cpp
@@ -176,7 +176,7 @@ void GarbageCollector::cleanupDeadAgent(const std::string & address, log::LogCon
    agent.commit();
   }
   // We now processed all the owned objects. We can delete the agent's entry
-  agent.removeAndUnregisterSelf();
+  agent.removeAndUnregisterSelf(lc);
   lc.log(log::INFO, "In GarbageCollector::cleanupDeadAgent(): agent entry removed.");
   // We can remove the agent from our own ownership.
   m_ourAgentReference.removeFromOwnership(address, m_objectStore);
diff --git a/objectstore/GarbageCollectorTest.cpp b/objectstore/GarbageCollectorTest.cpp
index 48ebb1f25c825d4e0ca14d3ea485026b1d545ee8..14ea0a465e03ead71a93f5d2ce63b776701a9b83 100644
--- a/objectstore/GarbageCollectorTest.cpp
+++ b/objectstore/GarbageCollectorTest.cpp
@@ -86,7 +86,7 @@ TEST(ObjectStore, GarbageCollectorBasicFuctionnality) {
   // Unregister gc's agent
   cta::objectstore::ScopedExclusiveLock gcal(gcAgent);
   gcAgent.fetch();
-  gcAgent.removeAndUnregisterSelf();
+  gcAgent.removeAndUnregisterSelf(lc);
   // We should not be able to remove the agent register (as it should be empty)
   rel.lock(re);
   re.fetch();
@@ -145,7 +145,7 @@ TEST(ObjectStore, GarbageCollectorRegister) {
   // Unregister gc's agent
   cta::objectstore::ScopedExclusiveLock gcal(gcAgent);
   gcAgent.fetch();
-  gcAgent.removeAndUnregisterSelf();
+  gcAgent.removeAndUnregisterSelf(lc);
   // We should not be able to remove the agent register (as it should be empty)
   rel.lock(re);
   re.fetch();
@@ -205,7 +205,7 @@ TEST(ObjectStore, GarbageCollectorArchiveQueue) {
   // Unregister gc's agent
   cta::objectstore::ScopedExclusiveLock gcal(gcAgent);
   gcAgent.fetch();
-  gcAgent.removeAndUnregisterSelf();
+  gcAgent.removeAndUnregisterSelf(lc);
   // We should not be able to remove the agent register (as it should be empty)
   rel.lock(re);
   re.fetch();
@@ -265,7 +265,7 @@ TEST(ObjectStore, GarbageCollectorDriveRegister) {
   // Unregister gc's agent
   cta::objectstore::ScopedExclusiveLock gcal(gcAgent);
   gcAgent.fetch();
-  gcAgent.removeAndUnregisterSelf();
+  gcAgent.removeAndUnregisterSelf(lc);
   // We should not be able to remove the agent register (as it should be empty)
   rel.lock(re);
   re.fetch();
@@ -443,7 +443,7 @@ TEST(ObjectStore, GarbageCollectorArchiveRequest) {
   // Unregister gc's agent
   cta::objectstore::ScopedExclusiveLock gcal(gcAgent);
   gcAgent.fetch();
-  gcAgent.removeAndUnregisterSelf();
+  gcAgent.removeAndUnregisterSelf(lc);
   // We should not be able to remove the agent register (as it should be empty)
   rel.lock(re);
   re.fetch();
@@ -624,7 +624,7 @@ TEST(ObjectStore, GarbageCollectorRetrieveRequest) {
   // Unregister gc's agent
   cta::objectstore::ScopedExclusiveLock gcal(gcAgent);
   gcAgent.fetch();
-  gcAgent.removeAndUnregisterSelf();
+  gcAgent.removeAndUnregisterSelf(lc);
   // We should not be able to remove the agent register (as it should be empty)
   rel.lock(re);
   re.fetch();
diff --git a/objectstore/RootEntryTest.cpp b/objectstore/RootEntryTest.cpp
index ba47ab8cdfdba6c851a0fd046dc9030822dcb074..289f347784a9d3ffd73c6ae0d44be2b40e7e70c9 100644
--- a/objectstore/RootEntryTest.cpp
+++ b/objectstore/RootEntryTest.cpp
@@ -76,6 +76,7 @@ TEST (ObjectStore, RootEntryArchiveQueues) {
   cta::objectstore::EntryLogSerDeser el("user0",
     "unittesthost", time(NULL));
   cta::log::DummyLogger dl("dummyLogger");
+  cta::log::LogContext lc(dl);
   cta::objectstore::AgentReference agr("UnitTests", dl);
   cta::objectstore::Agent ag(agr.getAgentAddress(), be);
   ag.initialize();
@@ -120,7 +121,7 @@ TEST (ObjectStore, RootEntryArchiveQueues) {
   }
   // Unregister the agent
   cta::objectstore::ScopedExclusiveLock agl(ag);
-  ag.removeAndUnregisterSelf();
+  ag.removeAndUnregisterSelf(lc);
   // Delete the root entry
   cta::objectstore::RootEntry re(be);
   cta::objectstore::ScopedExclusiveLock lock(re);
@@ -143,6 +144,7 @@ TEST (ObjectStore, RootEntryDriveRegister) {
   cta::objectstore::EntryLogSerDeser el("user0",
     "unittesthost", time(NULL));
   cta::log::DummyLogger dl("dummyLogger");
+  cta::log::LogContext lc(dl);
   cta::objectstore::AgentReference agr("UnitTests", dl); 
   cta::objectstore::Agent ag(agr.getAgentAddress(), be);
   ag.initialize();
@@ -177,7 +179,7 @@ TEST (ObjectStore, RootEntryDriveRegister) {
   }
   // Unregister the agent
   cta::objectstore::ScopedExclusiveLock agl(ag);
-  ag.removeAndUnregisterSelf();
+  ag.removeAndUnregisterSelf(lc);
   // Delete the root entry
   cta::objectstore::RootEntry re(be);
   cta::objectstore::ScopedExclusiveLock lock(re);
@@ -247,6 +249,7 @@ TEST (ObjectStore, RootEntrySchedulerGlobalLock) {
   cta::objectstore::EntryLogSerDeser el("user0",
     "unittesthost", time(NULL));
   cta::log::DummyLogger dl("dummyLogger");
+  cta::log::LogContext lc(dl);
   cta::objectstore::AgentReference agr("UnitTests", dl);
   cta::objectstore::Agent ag(agr.getAgentAddress(), be);
   ag.initialize();
@@ -281,7 +284,7 @@ TEST (ObjectStore, RootEntrySchedulerGlobalLock) {
   }
   // Unregister the agent
   cta::objectstore::ScopedExclusiveLock agl(ag);
-  ag.removeAndUnregisterSelf();
+  ag.removeAndUnregisterSelf(lc);
   // Delete the root entry
   cta::objectstore::RootEntry re(be);
   cta::objectstore::ScopedExclusiveLock lock(re);
diff --git a/objectstore/cta-objectstore-collect-orphaned-object.cpp b/objectstore/cta-objectstore-collect-orphaned-object.cpp
index 6b84c657e769b4de4b576d8acb33d9c4f53d41db..1509ccc740ff3fde467e8bcb8d6fd05f76a68d62 100644
--- a/objectstore/cta-objectstore-collect-orphaned-object.cpp
+++ b/objectstore/cta-objectstore-collect-orphaned-object.cpp
@@ -129,7 +129,7 @@ int main(int argc, char ** argv) {
       break;
     }
     cta::objectstore::ScopedExclusiveLock agl(ag);
-    ag.removeAndUnregisterSelf();
+    ag.removeAndUnregisterSelf(lc);
   } catch (std::exception & e) {
     std::cerr << "Failed to garbage collect object: "
         << std::endl << e.what() << std::endl;