diff --git a/Sim/Simulation/DepthprobeSimulation.cpp b/Sim/Simulation/DepthprobeSimulation.cpp
index 557e90bff150d644c28d4746884c6a205e162f93..4783193537835dcd8ac201dd14ab1684be6c2f92 100644
--- a/Sim/Simulation/DepthprobeSimulation.cpp
+++ b/Sim/Simulation/DepthprobeSimulation.cpp
@@ -137,7 +137,7 @@ void DepthprobeSimulation::initElementVector()
                                   alpha_limits.isInRange(result_angle));
     }
 
-    m_cache = std::vector<double>(m_depth_eles.size() * zAxis()->size(), 0.);
+    m_cache.resize(m_depth_eles.size() * zAxis()->size(), 0.);
 }
 
 std::unique_ptr<IComputation>