Index: libcfa/src/memory.cfa
===================================================================
--- libcfa/src/memory.cfa	(revision bf1914ebf83b7339b0c3ced4f46a69e3a05008bf)
+++ libcfa/src/memory.cfa	(revision 09da82dda65553a9f7ddeef8893821d2a45a2a87)
@@ -66,5 +66,5 @@
 forall(dtype T | sized(T), ttype Args | { void ?{}(T&, Args); })
 void ?{}(counter_ptr(T) & this, Args args) {
-	this.data = new(args);
+	this.data = (counter_data(T)*)new(args);
 }
 
@@ -126,5 +126,5 @@
 forall(dtype T | sized(T), ttype Args | { void ?{}(T &, Args); })
 void ?{}(unique_ptr(T) & this, Args args) {
-	this.data = new(args);
+	this.data = (T *)new(args);
 }
 
Index: libcfa/src/stdlib.hfa
===================================================================
--- libcfa/src/stdlib.hfa	(revision bf1914ebf83b7339b0c3ced4f46a69e3a05008bf)
+++ libcfa/src/stdlib.hfa	(revision 09da82dda65553a9f7ddeef8893821d2a45a2a87)
@@ -267,5 +267,5 @@
 static inline forall( dtype T | sized(T), ttype TT | { void ?{}( T &, TT ); } )
 T * new( TT p ) {
-	return &(*malloc()){ p };							// run constructor
+	return &(*(T *)malloc()){ p };							// run constructor
 } // new
 
