diff --git a/src/feature_creation/node/FeatureNode.hpp b/src/feature_creation/node/FeatureNode.hpp
index 5ae8d21981eaf0de607fa8df70e4e1bab6db9fb9..371204bb1f692a07c280d3bd6cff5251ee42e541 100644
--- a/src/feature_creation/node/FeatureNode.hpp
+++ b/src/feature_creation/node/FeatureNode.hpp
@@ -346,6 +346,7 @@ public:
         {
             throw std::logic_error("Can't get a child node from a FeatureNode.");
         }
+        return nullptr;
     }
 
     /**
diff --git a/tests/googletest/feature_creation/feature_generation/test_div_node.cc b/tests/googletest/feature_creation/feature_generation/test_div_node.cc
index 766b4fa439d173f8a9d596d7c979028fc644c07f..423915850d78be48a6cf6bbc8f8e98c191a2e744 100644
--- a/tests/googletest/feature_creation/feature_generation/test_div_node.cc
+++ b/tests/googletest/feature_creation/feature_generation/test_div_node.cc
@@ -25,8 +25,6 @@ namespace
     protected:
         void SetUp() override
         {
-            nlopt_wrapper::MAX_PARAM_DEPTH = 1;
-
             #ifdef PARAMETERIZE
             node_value_arrs::initialize_values_arr({4}, {1}, 4, 2, true);
             nlopt_wrapper::MAX_PARAM_DEPTH = 1;
diff --git a/tests/googletest/feature_creation/feature_generation/test_mult_node.cc b/tests/googletest/feature_creation/feature_generation/test_mult_node.cc
index a9a29418da54ae9a41715f94990571bc7e3abd37..b7c61bcc1d0a38d5afed2e0691827712c616d32d 100644
--- a/tests/googletest/feature_creation/feature_generation/test_mult_node.cc
+++ b/tests/googletest/feature_creation/feature_generation/test_mult_node.cc
@@ -24,8 +24,6 @@ namespace
     protected:
         void SetUp() override
         {
-            nlopt_wrapper::MAX_PARAM_DEPTH = 1;
-
             #ifdef PARAMETERIZE
             node_value_arrs::initialize_values_arr({4}, {1}, 4, 2, true);
             nlopt_wrapper::MAX_PARAM_DEPTH = 1;