diff --git a/src/algorithms.hpp b/src/algorithms.hpp
index db8b33988f9a12b8cb49d5f510c5661c5904f18f..250cade2905ffe8aa45a9554dab196412d574aff 100644
--- a/src/algorithms.hpp
+++ b/src/algorithms.hpp
@@ -1,6 +1,7 @@
 #pragma once
 
 #include <algorithm>
+#include <numeric>
 #include <type_traits>
 
 /*
diff --git a/tests/test_algorithms.cpp b/tests/test_algorithms.cpp
index 342c094ae50a31baf7083f1db89c60e056828a6d..decf1316702dc5e04133131e838caa09e2539373 100644
--- a/tests/test_algorithms.cpp
+++ b/tests/test_algorithms.cpp
@@ -25,6 +25,7 @@ TEST(algorithms, make_index)
         auto index = nest::mc::algorithms::make_index(v);
 
         EXPECT_EQ(index.size(), 11u);
+        EXPECT_EQ(index.front(), 0);
         EXPECT_EQ(index.back(), nest::mc::algorithms::sum(v));
     }
 
@@ -34,6 +35,7 @@ TEST(algorithms, make_index)
         auto index = nest::mc::algorithms::make_index(v);
 
         EXPECT_EQ(index.size(), 11u);
+        EXPECT_EQ(index.front(), 0);
         EXPECT_EQ(index.back(), nest::mc::algorithms::sum(v));
     }
 }
diff --git a/tests/test_compartments.cpp b/tests/test_compartments.cpp
index 4a40f1f8bf69be50d7d17413d117dc4fc0b979c6..c109f9cda9a335ce32f695f85ccd0295446a5d92 100644
--- a/tests/test_compartments.cpp
+++ b/tests/test_compartments.cpp
@@ -1,3 +1,5 @@
+#include <cmath>
+
 #include "gtest.h"
 
 #include "../src/compartment.hpp"