diff --git a/dumux/common/boundaryflag.hh b/dumux/common/boundaryflag.hh
index dec09f77788d3fc04b9eadd139e8653d69aa0961..abbda33247c7462401c27906df17c6c7d5d392a3 100644
--- a/dumux/common/boundaryflag.hh
+++ b/dumux/common/boundaryflag.hh
@@ -24,6 +24,8 @@
 #ifndef DUMUX_BOUNDARY_FLAG_HH
 #define DUMUX_BOUNDARY_FLAG_HH
 
+#include <cstddef>
+
 // ALUGrid specific includes
 #if HAVE_DUNE_ALUGRID
 #include <dune/alugrid/grid.hh>
diff --git a/dumux/material/components/base.hh b/dumux/material/components/base.hh
index 9b48e4feaa140221ce1fff6a5c78418d882fe808..2d78d82c3d16a646f88e6b927701f808775f46f3 100644
--- a/dumux/material/components/base.hh
+++ b/dumux/material/components/base.hh
@@ -29,6 +29,11 @@
 #ifndef DUMUX_COMPONENT_BASE_HH
 #define DUMUX_COMPONENT_BASE_HH
 
+#include <string>
+
+#include <dune/common/exceptions.hh>
+#include <dune/common/stdstreams.hh>
+
 namespace Dumux {
 namespace Components {
 
diff --git a/dumux/material/components/gas.hh b/dumux/material/components/gas.hh
index 7f9c1c7860edfee07ce76456d193135fcf4f67c8..32715df7eb73a889dcd6d2360d2bca136007bacc 100644
--- a/dumux/material/components/gas.hh
+++ b/dumux/material/components/gas.hh
@@ -25,6 +25,8 @@
 #ifndef DUMUX_COMPONENT_GAS_HH
 #define DUMUX_COMPONENT_GAS_HH
 
+#include <dune/common/exceptions.hh>
+
 namespace Dumux {
 namespace Components {
 
diff --git a/dumux/material/components/liquid.hh b/dumux/material/components/liquid.hh
index 9dc418f1af8eb95e18ee13bedbe7a2d2a663d9d7..aa088d37ef06364bb808d351893eff19e3405ede 100644
--- a/dumux/material/components/liquid.hh
+++ b/dumux/material/components/liquid.hh
@@ -25,6 +25,8 @@
 #ifndef DUMUX_COMPONENT_LIQUID_HH
 #define DUMUX_COMPONENT_LIQUID_HH
 
+#include <dune/common/exceptions.hh>
+
 namespace Dumux {
 namespace Components {
 
diff --git a/dumux/material/components/solid.hh b/dumux/material/components/solid.hh
index 72ae7dff2378c8f659249448279f3b40f85d8dca..58fb8756c418e9201e1f7474bfab54e7956d71ae 100644
--- a/dumux/material/components/solid.hh
+++ b/dumux/material/components/solid.hh
@@ -25,6 +25,8 @@
 #ifndef DUMUX_COMPONENT_SOLID_HH
 #define DUMUX_COMPONENT_SOLID_HH
 
+#include <dune/common/exceptions.hh>
+
 namespace Dumux {
 namespace Components {
 
diff --git a/dumux/porousmediumflow/co2/primaryvariableswitch.hh b/dumux/porousmediumflow/co2/primaryvariableswitch.hh
index a931f90902e15daed9c2b3b457b719b4f9a929b7..eb1745fc26e5765baee35cfd31bfaebf86f8fc1c 100644
--- a/dumux/porousmediumflow/co2/primaryvariableswitch.hh
+++ b/dumux/porousmediumflow/co2/primaryvariableswitch.hh
@@ -40,7 +40,7 @@ template<class TypeTag>
 class TwoPTwoCCO2PrimaryVariableSwitch
 : public PrimaryVariableSwitch<typename GET_PROP_TYPE(TypeTag, FVGridGeometry), TwoPTwoCCO2PrimaryVariableSwitch<TypeTag>>
 {
-    using ParentType = PrimaryVariableSwitch<typename GET_PROP_TYPE(TypeTag, FVGridGeometry), TwoPTwoCCO2PrimaryVariableSwitch<TypeTag>>;;
+    using ParentType = PrimaryVariableSwitch<typename GET_PROP_TYPE(TypeTag, FVGridGeometry), TwoPTwoCCO2PrimaryVariableSwitch<TypeTag>>;
     friend ParentType;
 
     using Scalar = typename GET_PROP_TYPE(TypeTag, Scalar);
diff --git a/test/porousmediumflow/co2/implicit/heterogeneousproblem.hh b/test/porousmediumflow/co2/implicit/heterogeneousproblem.hh
index 75ae22fdfc2a2ae77d2872e8a1f9e3d12757f0eb..33ad7ac3e6fabde6cb4f0ce86ffa5a6d9c43c20e 100644
--- a/test/porousmediumflow/co2/implicit/heterogeneousproblem.hh
+++ b/test/porousmediumflow/co2/implicit/heterogeneousproblem.hh
@@ -57,7 +57,9 @@ NEW_TYPE_TAG(HeterogeneousBoxTypeTag, INHERITS_FROM(BoxModel, HeterogeneousTypeT
 NEW_TYPE_TAG(HeterogeneousCCTpfaTypeTag, INHERITS_FROM(CCTpfaModel, HeterogeneousTypeTag));
 
 // Set the grid type
+#if HAVE_DUNE_ALUGRID
 SET_TYPE_PROP(HeterogeneousTypeTag, Grid, Dune::ALUGrid<2, 2, Dune::cube, Dune::nonconforming>);
+#endif
 
 // Set the problem property
 SET_TYPE_PROP(HeterogeneousTypeTag, Problem, HeterogeneousProblem<TypeTag>);