Index: libcfa/src/bits/debug.hfa
===================================================================
--- libcfa/src/bits/debug.hfa	(revision 983edfd198b5a501a1d03a410f240615c814c477)
+++ libcfa/src/bits/debug.hfa	(revision c84b4be20d06963eb1b538cfb902b7ba61e4644d)
@@ -37,4 +37,5 @@
 	#include <stdarg.h>
 	#include <stdio.h>
+	#include <unistd.h>
 
 	extern void __cfaabi_bits_write( int fd, const char *buffer, int len );
@@ -49,13 +50,15 @@
 #endif
 
+// #define __CFA_DEBUG_PRINT__
+
 #ifdef __CFA_DEBUG_PRINT__
 	#define __cfaabi_dbg_write( buffer, len )         __cfaabi_bits_write( STDERR_FILENO, buffer, len )
 	#define __cfaabi_dbg_acquire()                    __cfaabi_bits_acquire()
 	#define __cfaabi_dbg_release()                    __cfaabi_bits_release()
-	#define __cfaabi_dbg_print_safe(...)              __cfaabi_bits_print_safe   (__VA_ARGS__)
-	#define __cfaabi_dbg_print_nolock(...)            __cfaabi_bits_print_nolock (__VA_ARGS__)
-	#define __cfaabi_dbg_print_buffer(...)            __cfaabi_bits_print_buffer (__VA_ARGS__)
-	#define __cfaabi_dbg_print_buffer_decl(...)       char __dbg_text[256]; int __dbg_len = snprintf( __dbg_text, 256, __VA_ARGS__ ); __cfaabi_bits_write( __dbg_text, __dbg_len );
-	#define __cfaabi_dbg_print_buffer_local(...)      __dbg_len = snprintf( __dbg_text, 256, __VA_ARGS__ ); __cfaabi_dbg_write( __dbg_text, __dbg_len );
+	#define __cfaabi_dbg_print_safe(...)              __cfaabi_bits_print_safe  ( STDERR_FILENO, __VA_ARGS__ )
+	#define __cfaabi_dbg_print_nolock(...)            __cfaabi_bits_print_nolock( STDERR_FILENO, __VA_ARGS__ )
+	#define __cfaabi_dbg_print_buffer(...)            __cfaabi_bits_print_buffer( STDERR_FILENO, __VA_ARGS__ )
+	#define __cfaabi_dbg_print_buffer_decl(...)       char __dbg_text[256]; int __dbg_len = snprintf( __dbg_text, 256, __VA_ARGS__ ); __cfaabi_bits_write( STDERR_FILENO, __dbg_text, __dbg_len );
+	#define __cfaabi_dbg_print_buffer_local(...)      __dbg_len = snprintf( __dbg_text, 256, __VA_ARGS__ ); __cfaabi_bits_write( STDERR_FILENO, __dbg_text, __dbg_len );
 #else
 	#define __cfaabi_dbg_write(...)               ((void)0)
Index: libcfa/src/concurrency/kernel.cfa
===================================================================
--- libcfa/src/concurrency/kernel.cfa	(revision 983edfd198b5a501a1d03a410f240615c814c477)
+++ libcfa/src/concurrency/kernel.cfa	(revision c84b4be20d06963eb1b538cfb902b7ba61e4644d)
@@ -556,14 +556,14 @@
 
 	with( *thrd->curr_cluster ) {
-		if(was_empty) {
-			lock      (proc_list_lock __cfaabi_dbg_ctx2);
-			if(idles) {
-				wake_fast(idles.head);
-			}
-			unlock    (proc_list_lock);
-		}
-		else if( struct processor * idle = idles.head ) {
-			wake_fast(idle);
-		}
+		// if(was_empty) {
+		// 	lock      (proc_list_lock __cfaabi_dbg_ctx2);
+		// 	if(idles) {
+		// 		wake_fast(idles.head);
+		// 	}
+		// 	unlock    (proc_list_lock);
+		// }
+		// else if( struct processor * idle = idles.head ) {
+		// 	wake_fast(idle);
+		// }
 	}
 
@@ -825,23 +825,23 @@
 //=============================================================================================
 static void halt(processor * this) with( *this ) {
-	// verify( ! __atomic_load_n(&do_terminate, __ATOMIC_SEQ_CST) );
-
-	with( *cltr ) {
-		lock      (proc_list_lock __cfaabi_dbg_ctx2);
-		push_front(idles, *this);
-		unlock    (proc_list_lock);
-	}
-
-	__cfaabi_dbg_print_safe("Kernel : Processor %p ready to sleep\n", this);
-
-	wait( idleLock );
-
-	__cfaabi_dbg_print_safe("Kernel : Processor %p woke up and ready to run\n", this);
-
-	with( *cltr ) {
-		lock      (proc_list_lock __cfaabi_dbg_ctx2);
-		remove    (idles, *this);
-		unlock    (proc_list_lock);
-	}
+	// // verify( ! __atomic_load_n(&do_terminate, __ATOMIC_SEQ_CST) );
+
+	// with( *cltr ) {
+	// 	lock      (proc_list_lock __cfaabi_dbg_ctx2);
+	// 	push_front(idles, *this);
+	// 	unlock    (proc_list_lock);
+	// }
+
+	// __cfaabi_dbg_print_safe("Kernel : Processor %p ready to sleep\n", this);
+
+	// wait( idleLock );
+
+	// __cfaabi_dbg_print_safe("Kernel : Processor %p woke up and ready to run\n", this);
+
+	// with( *cltr ) {
+	// 	lock      (proc_list_lock __cfaabi_dbg_ctx2);
+	// 	remove    (idles, *this);
+	// 	unlock    (proc_list_lock);
+	// }
 }
 
Index: libcfa/src/concurrency/kernel.hfa
===================================================================
--- libcfa/src/concurrency/kernel.hfa	(revision 983edfd198b5a501a1d03a410f240615c814c477)
+++ libcfa/src/concurrency/kernel.hfa	(revision c84b4be20d06963eb1b538cfb902b7ba61e4644d)
@@ -194,4 +194,5 @@
 	volatile bool lock;
 	unsigned int last_id;
+	unsigned int count;
 
 	// anchor for the head and the tail of the queue
Index: libcfa/src/concurrency/monitor.cfa
===================================================================
--- libcfa/src/concurrency/monitor.cfa	(revision 983edfd198b5a501a1d03a410f240615c814c477)
+++ libcfa/src/concurrency/monitor.cfa	(revision c84b4be20d06963eb1b538cfb902b7ba61e4644d)
@@ -816,5 +816,5 @@
 	}
 
-	__cfaabi_dbg_print_safe( "Kernel :  Runing %i (%p)\n", ready2run, ready2run ? node->waiting_thread : 0p );
+	__cfaabi_dbg_print_safe( "Kernel :  Runing %i (%p)\n", ready2run, ready2run ? (thread_desc*)node->waiting_thread : (thread_desc*)0p );
 	return ready2run ? node->waiting_thread : 0p;
 }
Index: libcfa/src/concurrency/preemption.cfa
===================================================================
--- libcfa/src/concurrency/preemption.cfa	(revision 983edfd198b5a501a1d03a410f240615c814c477)
+++ libcfa/src/concurrency/preemption.cfa	(revision c84b4be20d06963eb1b538cfb902b7ba61e4644d)
@@ -120,5 +120,5 @@
 	// If there are still alarms pending, reset the timer
 	if( alarms->head ) {
-		__cfaabi_dbg_print_buffer_decl( " KERNEL: @%ju(%ju) resetting alarm to %ju.\n", currtime.tv, __kernel_get_time().tv, (alarms->head->alarm - currtime).tv);
+		// __cfaabi_dbg_print_buffer_decl( " KERNEL: @%ju(%ju) resetting alarm to %ju.\n", currtime.tv, __kernel_get_time().tv, (alarms->head->alarm - currtime).tv);
 		Duration delta = alarms->head->alarm - currtime;
 		Duration caped = max(delta, 50`us);
Index: libcfa/src/concurrency/ready_queue.cfa
===================================================================
--- libcfa/src/concurrency/ready_queue.cfa	(revision 983edfd198b5a501a1d03a410f240615c814c477)
+++ libcfa/src/concurrency/ready_queue.cfa	(revision c84b4be20d06963eb1b538cfb902b7ba61e4644d)
@@ -240,4 +240,5 @@
 	this.lock = false;
 	this.last_id = -1u;
+	this.count = 0u;
 
 	this.before.link.prev = 0p;
@@ -283,4 +284,5 @@
 	/* paranoid */ verify(tail(this)->link.next == 0p );
 	/* paranoid */ verify(tail(this)->link.prev == head(this) );
+	/* paranoid */ verify(this.count == 0u );
 }
 
@@ -292,4 +294,6 @@
 	verify(node->link.next == 0p);
 	verify(node->link.prev == 0p);
+
+	this.count++;
 
 	if(this.before.link.ts == 0l) {
@@ -345,4 +349,5 @@
 	}
 
+	this.count--;
 	/* paranoid */ verify(node);
 
@@ -693,4 +698,5 @@
 void ready_queue_grow  (struct cluster * cltr) {
 	uint_fast32_t last_size = ready_mutate_lock( *cltr );
+	__cfaabi_dbg_print_safe("Kernel : Growing ready queue\n");
 	check( cltr->ready_queue );
 
@@ -723,4 +729,5 @@
 	// Make sure that everything is consistent
 	check( cltr->ready_queue );
+	__cfaabi_dbg_print_safe("Kernel : Growing ready queue done\n");
 	ready_mutate_unlock( *cltr, last_size );
 }
@@ -728,5 +735,13 @@
 void ready_queue_shrink(struct cluster * cltr) {
 	uint_fast32_t last_size = ready_mutate_lock( *cltr );
+	__cfaabi_dbg_print_safe("Kernel : Shrinking ready queue\n");
 	with( cltr->ready_queue ) {
+		#if defined(__CFA_WITH_VERIFY__)
+			size_t nthreads = 0;
+			for( idx; (size_t)list.count ) {
+				nthreads += list.data[idx].count;
+			}
+		#endif
+
 		size_t ocount = list.count;
 		// Check that we have some space left
@@ -737,4 +752,5 @@
 		// redistribute old data
 		verify(ocount > list.count);
+		__attribute__((unused)) size_t displaced = 0;
 		for( idx; (size_t)list.count ~ ocount) {
 			// This is not strictly needed but makes checking invariants much easier
@@ -747,4 +763,5 @@
 				verify(thrd);
 				push(cltr, thrd);
+				displaced++;
 			}
 
@@ -755,4 +772,6 @@
 			^(list.data[idx]){};
 		}
+
+		__cfaabi_dbg_print_safe("Kernel : Shrinking ready queue displaced %zu threads\n", displaced);
 
 		// clear the now unused masks
@@ -776,5 +795,5 @@
 
 			empty.count = 0;
-			for( i ; lword ) {
+			for( i ; 0 ~= lword ) {
 				empty.count += __builtin_popcountl(empty.mask[i]);
 			}
@@ -788,8 +807,16 @@
 			fix(list.data[idx]);
 		}
+
+		#if defined(__CFA_WITH_VERIFY__)
+			for( idx; (size_t)list.count ) {
+				nthreads -= list.data[idx].count;
+			}
+			assertf(nthreads == 0, "Shrinking changed number of threads");
+		#endif
 	}
 
 	// Make sure that everything is consistent
 	check( cltr->ready_queue );
+	__cfaabi_dbg_print_safe("Kernel : Shrinking ready queue done\n");
 	ready_mutate_unlock( *cltr, last_size );
 }
