diff --git a/unittest/ref.cpp b/unittest/ref.cpp
index 0ca38fc059f7d987adbf1271d5a71b71afce1d0d..a8bff02f3183fa1724d7408376174da454b646df 100644
--- a/unittest/ref.cpp
+++ b/unittest/ref.cpp
@@ -36,12 +36,20 @@ void printVector(const eigenpy::Ref<MatType> & mat)
   printMatrix(mat);
 }
 
-template<typename MatType>
-void setOnes(eigenpy::Ref<MatType> mat)
+template<typename MatType,int Options, typename StrideType>
+void setOnes(Eigen::Ref<MatType,Options,StrideType> mat)
 {
   mat.setOnes();
 }
 
+template<typename MatType>
+void setOnes_wrap(eigenpy::Ref<MatType> mat)
+{
+  setOnes(mat);
+}
+
+
+
 BOOST_PYTHON_MODULE(ref)
 {
   namespace bp = boost::python;
@@ -53,7 +61,7 @@ BOOST_PYTHON_MODULE(ref)
   
   bp::def("printVector", printVector<VectorXd>);
 
-  bp::def("setOnes", setOnes<Vector3d>);
-  bp::def("setOnes", setOnes<VectorXd>);
-  bp::def("setOnes", setOnes<MatrixXd>);
+  bp::def("setOnes", setOnes_wrap<Vector3d>);
+  bp::def("setOnes", setOnes_wrap<VectorXd>);
+  bp::def("setOnes", setOnes_wrap<MatrixXd>);
 }