Index: src/Concurrency/Waituntil.cpp
===================================================================
--- src/Concurrency/Waituntil.cpp	(revision c3f7dd96497f906c0a6461c6f12210459f2a0cef)
+++ src/Concurrency/Waituntil.cpp	(revision b93bf851cd2f4c65993fbbd554e9a71949aa906d)
@@ -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) )
+        //     )
+        // );
     }
 
