Index: src/Concurrency/Waituntil.cpp
===================================================================
--- src/Concurrency/Waituntil.cpp	(revision bccd70a18277379d29bc911ade6a08acf9c36dbd)
+++ src/Concurrency/Waituntil.cpp	(revision 6c121eed6f4c0f793dca1e69b669f683bcfdfe3e)
@@ -940,37 +940,8 @@
 	}
 
-    // C_TODO: will remove this commented code later. Currently it isn't needed but may switch to a modified version of this later if it has better performance
-    // std::vector<ptr<CaseClause>> switchCases;
-
-    // int idx = 0;
-    // for ( const auto & clause: stmt->clauses ) {
-    //     const CodeLocation & cLoc = clause->location;
-    //     switchCases.push_back(
-    //         new CaseClause( cLoc,
-    //             new CastExpr( cLoc, 
-    //                 new AddressExpr( cLoc, new NameExpr( cLoc, data.at(idx)->targetName ) ),
-    //                 new BasicType( BasicType::Kind::LongUnsignedInt ), GeneratedFlag::ExplicitCast 
-    //             ),
-    //             {
-    //                 new CompoundStmt( cLoc,
-    //                     {
-    //                         ast::deepCopy( clause->stmt ),
-    //                         new BranchStmt( cLoc, BranchStmt::Kind::Break, Label( cLoc ) )
-    //                     }
-    //                 )
-    //             }
-    //         )
-    //     );
-    //     idx++;
-    // }
-
     return new CompoundStmt( loc,
         {
             new ExprStmt( loc, new UntypedExpr( loc, new NameExpr( loc, "park" ) ) ),
             outerIf
-            // new SwitchStmt( loc,
-            //     new NameExpr( loc, statusName ),
-            //     std::move( switchCases )
-            // )
         }
     );
@@ -1015,4 +986,5 @@
     const CodeLocation & cLoc = stmt->clauses.at(idx)->location;
 
+    Expr * baseCond = genSelectTraitCall( stmt->clauses.at(idx), data.at(idx), "register_select" );
     Expr * ifCond;
 
@@ -1025,10 +997,10 @@
             ),
             new CastExpr( cLoc,
-                genSelectTraitCall( stmt->clauses.at(idx), data.at(idx), "register_select" ),
+                baseCond,
                 new BasicType( BasicType::Kind::Bool ), GeneratedFlag::ExplicitCast 
             ),
             LogicalFlag::AndExpr
         );
-    } else ifCond = genSelectTraitCall( stmt->clauses.at(idx), data.at(idx), "register_select" );
+    } else ifCond = baseCond;
 
     return new CompoundStmt( cLoc,
