diff --git a/src/bisection-example-flexible.cc b/src/bisection-example-flexible.cc
index 73a2e7718f65ad1ed353410c0711eab3bdac9242..f4d4089081a06713f7583656268db5bdad2721b0 100644
--- a/src/bisection-example-flexible.cc
+++ b/src/bisection-example-flexible.cc
@@ -80,7 +80,7 @@ class SampleFunctional {
     }
 
     double m = l / 2 + r / 2;
-    SmallVector middle;
+    SmallVector middle = SmallVector(0.0);
     for (unsigned int count = 0; count < iterations; ++count) {
       Dune::dverb << "now at m = " << m << std::endl;
       Dune::dverb << "Value of J here: " << operator()(x + middle) << std::endl;