diff --git a/MeshLib/Elements/Utils.h b/MeshLib/Elements/Utils.h
index e78c4190ced1d38a36ff2db72d8b4489d8ef7fdf..5174dcff86bcfcdac07c8eebbb6fb3eaa3dfbc8a 100644
--- a/MeshLib/Elements/Utils.h
+++ b/MeshLib/Elements/Utils.h
@@ -36,6 +36,7 @@ inline std::vector<Node*> getBaseNodes(std::vector<Element*> const& elements)
 
     BaseLib::makeVectorUnique(base_nodes, MeshLib::idsComparator<Node*>);
 
+    base_nodes.shrink_to_fit();
     return base_nodes;
 }