diff --git a/cmake_modules/Findcsm.cmake b/cmake_modules/Findcsm.cmake
index 938022e920cddb287f773480596ffe497d8a0306..6dafd97ded05ef9df2b4b19b318639855fa48af5 100755
--- a/cmake_modules/Findcsm.cmake
+++ b/cmake_modules/Findcsm.cmake
@@ -47,7 +47,7 @@ macro(csm_report_not_found REASON_MSG)
   # FindPackage() use the camelcase library name, not uppercase.
   if (csm_FIND_QUIETLY)
     message(STATUS "Failed to find csm- " ${REASON_MSG} ${ARGN})
-  else (csm_FIND_REQUIRED)
+  elseif (csm_FIND_REQUIRED)
     message(FATAL_ERROR "Failed to find csm - " ${REASON_MSG} ${ARGN})
   else()
     # Neither QUIETLY nor REQUIRED, use SEND_ERROR which emits an error
diff --git a/include/laser/state_block/local_parametrization_polyline_extreme.h b/include/laser/state_block/local_parametrization_polyline_extreme.h
index 7520d63d05c87f80c429055372b69915ab7aaeff..2a2c2340729fd776c22a6ab7d1f6708896860f8d 100644
--- a/include/laser/state_block/local_parametrization_polyline_extreme.h
+++ b/include/laser/state_block/local_parametrization_polyline_extreme.h
@@ -31,6 +31,11 @@ class LocalParametrizationPolylineExtreme : public LocalParametrizationBase
         bool minus(Eigen::Map<const Eigen::VectorXd>& _point1,
                            Eigen::Map<const Eigen::VectorXd>& _point2,
                            Eigen::Map<Eigen::VectorXd>& _delta_theta) override;
+        bool isValid(const Eigen::VectorXd& _state, double tolerance) override
+        {
+            return _state.size() == global_size_;
+        }
+
 };
 
 } // namespace wolf