diff --git a/CMakeLists.txt b/CMakeLists.txt
index 68ebfdd0323db2cc65d0b01dfb5982b18c9571a4..5678eaf858952ffc20be0f727882bb05516c4af2 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -3,16 +3,11 @@ IF(NOT CMAKE_BUILD_TYPE)
   SET(CMAKE_BUILD_TYPE "DEBUG")
 ENDIF()
 
-IF(NOT BOOST_NUMPY_DIR)
-  SET(BOOST_NUMPY_DIR ".")
-ENDIF()
-
 FIND_PACKAGE(Boost 1.45.0)
 
 IF(Boost_FOUND)
 
-  INCLUDE_DIRECTORIES("${Boost_INCLUDE_DIRS}" "/usr/include/python2.7" "/usr/include/eigen3" "Boost.NumPy")
-  LINK_DIRECTORIES(${BOOST_NUMPY_DIR})
+  INCLUDE_DIRECTORIES("${Boost_INCLUDE_DIRS}" "/usr/include/python2.7" "/usr/include/eigen3")
 
   SET(Boost_USE_STATIC_LIBS OFF)
   SET(Boost_USE_MULTITHREADED ON)
@@ -22,24 +17,6 @@ IF(Boost_FOUND)
   ADD_LIBRARY(eigenpy SHARED unittest/libeigenpy.cpp)
   TARGET_LINK_LIBRARIES(eigenpy ${Boost_LIBRARIES})
 
-  ADD_LIBRARY(simple SHARED unittest/alpha/simple.cpp)
-  TARGET_LINK_LIBRARIES(simple ${Boost_LIBRARIES})
-
-  ADD_LIBRARY(mystring SHARED unittest/alpha/mystring.cpp)
-  TARGET_LINK_LIBRARIES(mystring ${Boost_LIBRARIES})
-
-  ADD_LIBRARY(bnpy SHARED unittest/alpha/bnpy.cpp)
-  TARGET_LINK_LIBRARIES(bnpy ${Boost_LIBRARIES})
-
-  ADD_LIBRARY(eigen SHARED unittest/alpha/eigen.cpp)
-  TARGET_LINK_LIBRARIES(eigen ${Boost_LIBRARIES} libboost_numpy.so)
-
-  ADD_LIBRARY(eigenc SHARED unittest/alpha/eigenc.cpp)
-  TARGET_LINK_LIBRARIES(eigenc ${Boost_LIBRARIES})
-
-  ADD_LIBRARY(eigentemplate SHARED unittest/alpha/eigentemplate.cpp)
-  TARGET_LINK_LIBRARIES(eigentemplate ${Boost_LIBRARIES})
-
 ELSEIF(NOT Boost_FOUND)
   MESSAGE(FATAL_ERROR "Unable to find correct Boost version. Did you set BOOST_ROOT?")
 ENDIF()
diff --git a/src/eigenpy.hpp b/src/eigenpy.hpp
index 76e8284e4a1fb161b959e2113a5b8856efa8f93b..da80715a98047ccbee50aa1d9605d529f3f07a92 100644
--- a/src/eigenpy.hpp
+++ b/src/eigenpy.hpp
@@ -113,8 +113,8 @@ namespace eigenpy
       const int itemsize = PyArray_ITEMSIZE(pyArray);
       const int stride = PyArray_STRIDE(pyArray, rowMajor) / itemsize;;
 
-      if( (MatType::MaxSizeAtCompileTime==R)
-	      || (MatType::MaxSizeAtCompileTime==Eigen::Dynamic) )
+      if( (MatType::MaxSizeAtCompileTime!=R)
+	      && (MatType::MaxSizeAtCompileTime!=Eigen::Dynamic) )
 	{ throw eigenpy::exception("The number of elements does not fit with the vector type."); }
 
       T* pyData = reinterpret_cast<T*>(PyArray_DATA(pyArray));