diff --git a/src/details.hpp b/src/details.hpp
index ce9ba1bc4cc0190f16809465cb4bdd8b7dd19ab7..467ce71de80fd98da310f699733c3835ec76d311 100644
--- a/src/details.hpp
+++ b/src/details.hpp
@@ -108,7 +108,7 @@ namespace eigenpy
   {
     static MatType & construct(void*storage,int /*r*/,int c)
     {
-      return * new(storage) MatType(c);
+      return * new(storage) MatType(R,c);
     }
   };
 
@@ -117,7 +117,7 @@ namespace eigenpy
   {
     static MatType & construct(void*storage,int r,int /*c*/)
     {
-      return * new(storage) MatType(r);
+      return * new(storage) MatType(r,C);
     }
   };