diff --git a/include/eigenpy/eigen-from-python.hpp b/include/eigenpy/eigen-from-python.hpp
index 3c4ea5890013063025a3ba686c41ca9105e601d7..4551a989350408c96b891c9721003b378bf6f4a2 100644
--- a/include/eigenpy/eigen-from-python.hpp
+++ b/include/eigenpy/eigen-from-python.hpp
@@ -16,7 +16,7 @@ namespace eigenpy
 {
   namespace details
   {
-    template<typename MatType, bool is_const = boost::is_const<MatType>::value >
+    template<typename MatType, bool is_const = boost::is_const<MatType>::value>
     struct copy_if_non_const
     {
       static void run(const Eigen::MatrixBase<MatType> & input,
@@ -27,7 +27,7 @@ namespace eigenpy
     };
   
     template<typename MatType>
-    struct copy_if_non_const<MatType,true>
+    struct copy_if_non_const<const MatType,true>
     {
       static void run(const Eigen::MatrixBase<MatType> & /*input*/,
                       PyArrayObject * /*pyArray*/)