Index: src/Concurrency/Waituntil.cpp
===================================================================
--- src/Concurrency/Waituntil.cpp	(revision 8913de40029583229718472d971b802c9a8735d7)
+++ src/Concurrency/Waituntil.cpp	(revision fc0996a0f6e251a465119fb1a55c0e0e49ebb126)
@@ -95,5 +95,5 @@
                         case 0:
                             try {
-                                if (on_selected( A, clause1 ))
+                                    on_selected( A, clause1 );
                                     doA();
                             }
@@ -122,5 +122,6 @@
         // the unregister and on_selected calls are needed to support primitives where the acquire has side effects
         // so the corresponding block MUST be run for those primitives to not lose state (example is channels)
-        if ( ! has_run(clause_statuses[0]) && whenA && unregister_select(A, clause1) && on_selected( A, clause1 ) )
+        if ( !has_run(clause_statuses[0]) && whenA && unregister_select(A, clause1) )
+            on_selected( A, clause1 )
             doA(); 
         ... repeat if above for B and C ...
@@ -619,5 +620,5 @@
 
 // Generates:
-/* if ( on_selected( target_1, node_1 )) ... corresponding body of target_1 ... 
+/* on_selected( target_1, node_1 ); ... corresponding body of target_1 ... 
 */
 CompoundStmt * GenerateWaitUntilCore::genStmtBlock( const WhenClause * clause, const ClauseData * data ) {
@@ -625,12 +626,8 @@
     return new CompoundStmt( cLoc,
         {
-            new IfStmt( cLoc,
-                genSelectTraitCall( clause, data, "on_selected" ),
-                new CompoundStmt( cLoc,
-                    {
-                        ast::deepCopy( clause->stmt )
-                    }
-                )
-            )
+            new ExprStmt( cLoc,
+                genSelectTraitCall( clause, data, "on_selected" )
+            ),
+            ast::deepCopy( clause->stmt )
         }
     );
@@ -644,6 +641,6 @@
             case 0:
                 try {
-                    if (on_selected( target1, clause1 ))
-                        dotarget1stmt();
+                    on_selected( target1, clause1 );
+                    dotarget1stmt();
                 }
                 finally { clause_statuses[i] = __SELECT_RUN; unregister_select(target1, clause1); }
@@ -664,6 +661,6 @@
         case 0:
             try {
-                if (on_selected( target1, clause1 ))
-                    dotarget1stmt();
+                on_selected( target1, clause1 );
+                dotarget1stmt();
             }
             finally { clause_statuses[i] = __SELECT_RUN; unregister_select(target1, clause1); }
@@ -1020,5 +1017,4 @@
                 ifCond,
                 genStmtBlock( stmt->clauses.at(idx), data.at(idx) ),
-                // ast::deepCopy( stmt->clauses.at(idx)->stmt ),
                 recursiveOrIfGen( stmt, data, idx + 1, elseWhenName )
             )
