diff --git a/product/CMFActivity/skins/activity/SQLDict_assignMessage.zsql b/product/CMFActivity/skins/activity/SQLDict_assignMessage.zsql
index 68575cf171b6d4a34c5002fd15410a391ae422fb..9ea1c6b11292ce4637b16d78b26dbb11d040e866 100644
--- a/product/CMFActivity/skins/activity/SQLDict_assignMessage.zsql
+++ b/product/CMFActivity/skins/activity/SQLDict_assignMessage.zsql
@@ -17,12 +17,12 @@ SET
   processing_node=<dtml-sqlvar processing_node type="int">,
   processing=0
 WHERE
-  processing_node = -1
 <dtml-if uid>
-  AND uid IN (
+  uid IN (
 <dtml-in uid><dtml-sqlvar sequence-item type="int"><dtml-if sequence-end><dtml-else>,</dtml-if></dtml-in>
 )
 <dtml-else>
+  processing_node = -1
   AND path = <dtml-sqlvar path type="string">
 <dtml-if method_id>AND method_id = <dtml-sqlvar method_id type="string"></dtml-if>
 </dtml-if>