diff --git a/src/workflow.py b/src/workflow.py
index 30433b1ab76b6df5f2bdcd5dbd6d0c6f36784859..612bd0e337a222a28db46c1c440f8b3dcba73a2b 100644
--- a/src/workflow.py
+++ b/src/workflow.py
@@ -1629,8 +1629,11 @@ George Marchment, Bryan Brancotte, Marie Schmit, Frédéric Lemoine, Sarah Cohen
                     code = code.replace("//Anker_clusters", new_code)
 
                     for old, new in channels_to_replace_outside_of_cluster:
-                        pattern= fr"[ \(,]({re.escape(old)})[^\w]"
+                        pattern= fr"[\s\(,]({re.escape(old)})[^\w]"
+                        temp = code
                         code = replace_group1(code, pattern, new)
+                        if(temp==code and old!=new):
+                            raise Exception("The old wasn't update")
                         #code = code.replace(old, new)
 
                     #Since i've added the conditions myself -> i can just count them by searching for this simple pattern