diff --git a/product/CMFActivity/Activity/SQLDict.py b/product/CMFActivity/Activity/SQLDict.py
index 6b9666f8f353413bb474fac00863e7742e0becb1..5971b51a1bce3d07cfbb3319e611e12c468e2291 100755
--- a/product/CMFActivity/Activity/SQLDict.py
+++ b/product/CMFActivity/Activity/SQLDict.py
@@ -62,7 +62,8 @@ class SQLDict(RAMDict):
 
   def prepareDeleteMessage(self, activity_tool, m):
     # Erase all messages in a single transaction
-    uid_list = activity_tool.SQLDict_readUidList(path=m.object_path, method_id=m.method_id,processing_node=None)
+    path = '/'.join(m.object_path)
+    uid_list = activity_tool.SQLDict_readUidList(path=path, method_id=m.method_id,processing_node=None)
     uid_list = map(lambda x:x.uid, uid_list)
     if len(uid_list)>0:
       activity_tool.SQLDict_delMessage(uid = uid_list) 
diff --git a/product/CMFActivity/ActivityBuffer.py b/product/CMFActivity/ActivityBuffer.py
index ba25d5117a226cbfa3f9f201bbb0d9adf25f55f4..173214d02d670b6e1f7ef6657eadd13f52c79126 100755
--- a/product/CMFActivity/ActivityBuffer.py
+++ b/product/CMFActivity/ActivityBuffer.py
@@ -67,8 +67,10 @@ class ActivityBuffer(TM):
             try:
                 # Try to push / delete all messages
                 for (activity, activity_tool, message) in self.flushed_activity:
+                    #LOG('ActivityBuffer finishDeleteMessage', ERROR, str(message.method_id))
                     activity.finishDeleteMessage(activity_tool, message)
                 for (activity, activity_tool, message) in self.queued_activity:
+                    #LOG('ActivityBuffer finishQueueMessage', ERROR, str(message.method_id))
                     activity.finishQueueMessage(activity_tool, message)
             except:
                 LOG('ActivityBuffer', ERROR, "exception during _finish",
@@ -94,8 +96,10 @@ class ActivityBuffer(TM):
         try:
             # Try to push / delete all messages
             for (activity, activity_tool, message) in self.flushed_activity:
+                #LOG('ActivityBuffer prepareDeleteMessage', ERROR, str(message.method_id))
                 activity.prepareDeleteMessage(activity_tool, message)
             for (activity, activity_tool, message) in self.queued_activity:
+                #LOG('ActivityBuffer prepareQueueMessage', ERROR, str(message.method_id))
                 activity.prepareQueueMessage(activity_tool, message)
         except:
             LOG('ActivityBuffer', ERROR, "exception during tpc_prepare",
diff --git a/product/CMFActivity/ActivityTool.py b/product/CMFActivity/ActivityTool.py
index cb8c3bdf3a1b063d31103f42e3f07a84c4f1f98c..3ed066e61c1c1bdc40540ec12d1468fe1b681dca 100755
--- a/product/CMFActivity/ActivityTool.py
+++ b/product/CMFActivity/ActivityTool.py
@@ -318,6 +318,7 @@ class ActivityTool (Folder, UniqueObject):
         return []
           
     def unregisterMessage(self, activity, message):
+      self._v_activity_buffer._register() # Required if called by flush, outside activate
       return activity.unregisterMessage(self._v_activity_buffer, self, message)
           
     def flush(self, object, invoke=0, **kw):