Index: src/ResolvExpr/Resolver.cc
===================================================================
--- src/ResolvExpr/Resolver.cc	(revision de6319f37ab741ed2ba4232a93ee62c240717bcd)
+++ src/ResolvExpr/Resolver.cc	(revision b9f383f02133e2fd12cbee9fc0753d823a608d5e)
@@ -492,4 +492,8 @@
 			}
 
+			if(clause.target.arguments.empty()) {
+				SemanticError( stmt->location, "Waitfor clause must have at least one mutex parameter");
+			}
+
 			// Find all alternatives for all arguments in canonical form
 			std::vector< AlternativeFinder > argAlternatives;
@@ -556,4 +560,6 @@
 							auto param_end = function->parameters.end();
 
+							int n_mutex_arg = 0;
+
 							// For every arguments of its set, check if it matches one of the parameter
 							// The order is important
@@ -564,15 +570,17 @@
 									// We ran out of parameters but still have arguments
 									// this function doesn't match
-									SemanticError( function, "candidate function not viable: too many mutex arguments\n" );
+									SemanticError( function, toString("candidate function not viable: too many mutex arguments, expected ", n_mutex_arg, "\n" ));
 								}
 
+								n_mutex_arg++;
+
 								// Check if the argument matches the parameter type in the current scope
-								if( ! unify( (*param)->get_type(), arg.expr->get_result(), resultEnv, resultNeed, resultHave, openVars, this->indexer ) ) {
+								if( ! unify( arg.expr->get_result(), (*param)->get_type(), resultEnv, resultNeed, resultHave, openVars, this->indexer ) ) {
 									// Type doesn't match
 									stringstream ss;
 									ss << "candidate function not viable: no known convertion from '";
+									(*param)->get_type()->print( ss );
+									ss << "' to '";
 									arg.expr->get_result()->print( ss );
-									ss << "' to '";
-									(*param)->get_type()->print( ss );
 									ss << "'\n";
 									SemanticError( function, ss.str() );
@@ -588,5 +596,5 @@
 								// We ran out of arguments but still have parameters left
 								// this function doesn't match
-								SemanticError( function, "candidate function not viable: too few mutex arguments\n" );
+								SemanticError( function, toString("candidate function not viable: too few mutex arguments, expected ", n_mutex_arg, "\n" ));
 							}
 
Index: src/SynTree/Statement.cc
===================================================================
--- src/SynTree/Statement.cc	(revision de6319f37ab741ed2ba4232a93ee62c240717bcd)
+++ src/SynTree/Statement.cc	(revision b9f383f02133e2fd12cbee9fc0753d823a608d5e)
@@ -453,6 +453,34 @@
 void WaitForStmt::print( std::ostream &os, Indenter indent ) const {
 	os << "Waitfor Statement" << endl;
-	os << indent << "... with block:" << endl << indent+1;
-	// block->print( os, indent + 4 );
+	indent += 1;
+	for( auto & clause : clauses ) {
+		os << indent << "target function :";
+		if(clause.target.function) { clause.target.function->print(os, indent + 1); }
+		os << endl << indent << "with arguments :" << endl;
+		for( auto & thing : clause.target.arguments) {
+			if(thing) { thing->print(os, indent + 1); }
+		}
+		os << indent << " with statment :" << endl;
+		if(clause.statement) { clause.statement->print(os, indent + 1); }
+
+		os << indent << " with condition :" << endl;
+		if(clause.condition) { clause.condition->print(os, indent + 1); }
+	}
+
+	os << indent << " timeout of :" << endl;
+	if(timeout.time) { timeout.time->print(os, indent + 1); }
+
+	os << indent << " with statment :" << endl;
+	if(timeout.statement) { timeout.statement->print(os, indent + 1); }
+
+	os << indent << " with condition :" << endl;
+	if(timeout.condition) { timeout.condition->print(os, indent + 1); }
+
+
+	os << indent << " else :" << endl;
+	if(orelse.statement) { orelse.statement->print(os, indent + 1); }
+
+	os << indent << " with condition :" << endl;
+	if(orelse.condition) { orelse.condition->print(os, indent + 1); }
 }
 
Index: src/tests/concurrent/examples/.expect/boundedBufferEXT.txt
===================================================================
--- src/tests/concurrent/examples/.expect/boundedBufferEXT.txt	(revision de6319f37ab741ed2ba4232a93ee62c240717bcd)
+++ src/tests/concurrent/examples/.expect/boundedBufferEXT.txt	(revision b9f383f02133e2fd12cbee9fc0753d823a608d5e)
@@ -1,79 +1,1 @@
-concurrent/examples/boundedBufferEXT.c:39:1 error: No alternatives for function in call to waitfor
-/u/pabuhr/software/cfa-cc/include/cfa/bits/containers.h:170:1 error: candidate function not viable: no mutex parameters
-forall
-  _6573_20_T: sized object type
-  ... with assertions
-    get_next: pointer to function
-    ... with parameters
-      reference to instance of type _6573_20_T (not function type) 
-    ... returning 
-      _retval_get_next: reference to pointer to instance of type _6573_20_T (not function type) 
-      ... with attributes: 
-        Attribute with name: unused
-
-
-
-  lvalue function
-... with parameters
-  this: reference to instance of struct __queue with body 1 
-  ... with parameters
-    instance of type _6573_20_T (not function type) 
-
-  it: pointer to pointer to instance of type _6573_20_T (not function type) 
-... returning 
-  _retval_remove: pointer to instance of type _6573_20_T (not function type) 
-  ... with attributes: 
-    Attribute with name: unused
-
-
-/usr/include/stdio.h:178:1 error: candidate function not viable: no mutex parameters
-lvalue function
-... with parameters
-  __filename: C pointer to const char
-... returning 
-  _retval_remove: signed int
-  ... with attributes: 
-    Attribute with name: unused
-
-
-concurrent/examples/boundedBufferEXT.c:47:1 error: No alternatives for function in call to waitfor
-concurrent/examples/boundedBufferEXT.c:37:1 error: candidate function not viable: too few mutex arguments
-forall
-  _6578_20_T: sized object type
-  ... with assertions
-    ?=?: pointer to function
-    ... with parameters
-      reference to instance of type _6578_20_T (not function type) 
-      instance of type _6578_20_T (not function type) 
-    ... returning 
-      _retval__operator_assign: instance of type _6578_20_T (not function type) 
-      ... with attributes: 
-        Attribute with name: unused
-
-
-    ?{}: pointer to function
-    ... with parameters
-      reference to instance of type _6578_20_T (not function type) 
-    ... returning nothing 
-
-    ?{}: pointer to function
-    ... with parameters
-      reference to instance of type _6578_20_T (not function type) 
-      instance of type _6578_20_T (not function type) 
-    ... returning nothing 
-
-    ^?{}: pointer to function
-    ... with parameters
-      reference to instance of type _6578_20_T (not function type) 
-    ... returning nothing 
-
-
-  lvalue function
-... with parameters
-  buffer: mutex reference to instance of struct Buffer with body 1 
-  ... with parameters
-    instance of type _6578_20_T (not function type) 
-
-  elem: instance of type _6578_20_T (not function type) 
-... returning nothing 
-
+total:400000
Index: src/tests/concurrent/examples/boundedBufferEXT.c
===================================================================
--- src/tests/concurrent/examples/boundedBufferEXT.c	(revision de6319f37ab741ed2ba4232a93ee62c240717bcd)
+++ src/tests/concurrent/examples/boundedBufferEXT.c	(revision b9f383f02133e2fd12cbee9fc0753d823a608d5e)
@@ -1,8 +1,8 @@
-// 
+//
 // The contents of this file are covered under the licence agreement in the
 // file "LICENCE" distributed with Cforall.
-// 
-// boundedBufferEXT.c -- 
-// 
+//
+// boundedBufferEXT.c --
+//
 // Author           : Peter A. Buhr
 // Created On       : Wed Apr 18 22:52:12 2018
@@ -10,5 +10,5 @@
 // Last Modified On : Fri Apr 20 22:25:14 2018
 // Update Count     : 6
-// 
+//
 
 #include <stdlib>										// random
@@ -39,5 +39,5 @@
 forall( otype T )
 void insert( Buffer(T) & mutex buffer, T elem ) with( buffer ) {
-	if ( count == BufferSize ) waitfor( remove );
+	if ( count == BufferSize ) waitfor( remove, buffer );
 	elements[back] = elem;
 	back = ( back + 1 ) % BufferSize;
@@ -47,5 +47,5 @@
 forall( otype T )
 T remove( Buffer(T) & mutex buffer ) with( buffer ) {
-	if ( count == 0 ) waitfor( insert );
+	if ( count == 0 ) waitfor( insert, buffer );
 	T elem = elements[front];
 	front = ( front + 1 ) % BufferSize;
Index: src/tests/concurrent/thread.c
===================================================================
--- src/tests/concurrent/thread.c	(revision de6319f37ab741ed2ba4232a93ee62c240717bcd)
+++ src/tests/concurrent/thread.c	(revision b9f383f02133e2fd12cbee9fc0753d823a608d5e)
@@ -7,6 +7,6 @@
 thread Second { semaphore* lock; };
 
-void ?{}( First & this, semaphore & lock ) { this.lock = &lock; }
-void ?{}( Second & this, semaphore & lock ) { this.lock = &lock; }
+void ?{}( First  & this, semaphore & lock ) { ((thread&)this){"Thread 1"}; this.lock = &lock; }
+void ?{}( Second & this, semaphore & lock ) { ((thread&)this){"Thread 2"}; this.lock = &lock; }
 
 void main(First& this) {
