Index: libcfa/src/concurrency/kernel.cfa
===================================================================
--- libcfa/src/concurrency/kernel.cfa	(revision 320ec6fc95f0cd3eb0e069c2baf00faccaba5778)
+++ libcfa/src/concurrency/kernel.cfa	(revision 39fc03effedee9acf13ca846d4c85c1bff3790ff)
@@ -324,11 +324,30 @@
 	threads{ __get };
 
+	doregister(this);
+
+	// Lock the RWlock so no-one pushes/pops while we are changing the queue
+	uint_fast32_t last_size = ready_mutate_lock();
+
+		// Adjust the ready queue size
+		ready_queue_grow( &this, 0 );
+
+	// Unlock the RWlock
+	ready_mutate_unlock( last_size );
+
+
 	__kernel_io_startup( this, io_flags, &this == mainCluster );
-
-	doregister(this);
 }
 
 void ^?{}(cluster & this) {
 	__kernel_io_shutdown( this, &this == mainCluster );
+
+	// Lock the RWlock so no-one pushes/pops while we are changing the queue
+	uint_fast32_t last_size = ready_mutate_lock();
+
+		// Adjust the ready queue size
+		ready_queue_shrink( &this, 0 );
+
+	// Unlock the RWlock
+	ready_mutate_unlock( last_size );
 
 	#if !defined(__CFA_NO_STATISTICS__)
Index: libcfa/src/concurrency/ready_queue.cfa
===================================================================
--- libcfa/src/concurrency/ready_queue.cfa	(revision 320ec6fc95f0cd3eb0e069c2baf00faccaba5778)
+++ libcfa/src/concurrency/ready_queue.cfa	(revision 39fc03effedee9acf13ca846d4c85c1bff3790ff)
@@ -191,5 +191,5 @@
 
 void ^?{}(__ready_queue_t & this) with (this) {
-	verify( 0  == lanes.count );
+	verify( 1 == lanes.count );
 	verify( !query( snzi ) );
 	free(lanes.data);
@@ -484,19 +484,4 @@
 }
 
-#warning remove when alloc is fixed
-forall( dtype T | sized(T) )
-static inline T * correct_alloc( T ptr[], size_t dim ) {
-	if( dim == 0 ) {
-		free(ptr);
-		return 0p;
-	}
-	T * temp = alloc( dim );
-	if(ptr) {
-		memcpy( temp, ptr, dim * sizeof(T));
-		free(ptr);
-	}
-	return temp;
-}
-
 // Grow the ready queue
 void ready_queue_grow  (struct cluster * cltr, int target) {
@@ -511,12 +496,10 @@
 		^(snzi){};
 
-		size_t ncount = lanes.count;
-
-		// increase count
-		ncount += 4;
-		/* paranoid */ verify( ncount == target * 4 || target < 2 );
+		// Find new count
+		// Make sure we always have atleast 1 list
+		size_t ncount = target >= 2 ? target * 4: 1;
 
 		// Allocate new array (uses realloc and memcpies the data)
-		lanes.data = correct_alloc(lanes.data, ncount);
+		lanes.data = alloc(lanes.data, ncount);
 
 		// Fix the moved data
@@ -561,11 +544,11 @@
 		^(snzi){};
 
+		// Remember old count
 		size_t ocount = lanes.count;
-		// Check that we have some space left
-		if(ocount < 4) abort("Program attempted to destroy more Ready Queues than were created");
-
-		// reduce the actual count so push doesn't use the old queues
-		lanes.count -= 4;
-		/* paranoid */ verify( ocount > lanes.count );
+
+		// Find new count
+		// Make sure we always have atleast 1 list
+		lanes.count = target >= 2 ? target * 4: 1;
+		/* paranoid */ verify( ocount >= lanes.count );
 		/* paranoid */ verify( lanes.count == target * 4 || target < 2 );
 
@@ -606,5 +589,5 @@
 
 		// Allocate new array (uses realloc and memcpies the data)
-		lanes.data = correct_alloc(lanes.data, lanes.count);
+		lanes.data = alloc(lanes.data, lanes.count);
 
 		// Fix the moved data
