Index: src/Concurrency/Waituntil.cpp
===================================================================
--- src/Concurrency/Waituntil.cpp	(revision ded018f9163d1fe78bae1d292d74be5535aeb2cb)
+++ src/Concurrency/Waituntil.cpp	(revision 68db00e1de4e9233afd9d1ebebb3543f84312e35)
@@ -1290,10 +1290,8 @@
     // Collection of unregister calls on resources to be put in finally clause
     // for each clause: 
-    // when_cond_i = (!__CFA_has_clause_run( clause_statuses[i] )) && unregister_select( ... , clausei );
+    // if ( !__CFA_has_clause_run( clause_statuses[i] )) && unregister_select( ... , clausei ) ) { ... clausei stmt ... }
     // OR if when( ... ) defined on resource
-    // if ( when_cond_i ) 
-    //   when_cond_i =  (!__CFA_has_clause_run( clause_statuses[i] )) && unregister_select( ... , clausei );
+    // if ( when_cond_i && (!__CFA_has_clause_run( clause_statuses[i] )) && unregister_select( ... , clausei ) ) { ... clausei stmt ... }
     CompoundStmt * unregisters = new CompoundStmt( loc );
-
 
     Expr * statusExpr; // !__CFA_has_clause_run( clause_statuses[i] )
@@ -1348,7 +1346,23 @@
             new IfStmt( cLoc,
                 statusExpr,
-                genStmtBlock( stmt->clauses.at(i), clauseData.at(i) )
-            )
-        );
+                new CompoundStmt( cLoc,
+                    {
+                        new IfStmt( cLoc,
+                            genSelectTraitCall( stmt->clauses.at(i), clauseData.at(i), "on_selected" ),
+                            ast::deepCopy( stmt->clauses.at(i)->stmt )
+                        )
+                    }
+                )
+            )
+        );
+
+        // // generates:
+        // // if ( statusExpr ) { ... clausei stmt ... }
+        // unregisters->push_back( 
+        //     new IfStmt( cLoc,
+        //         statusExpr,
+        //         genStmtBlock( stmt->clauses.at(i), clauseData.at(i) )
+        //     )
+        // );
     }
 
