diff --git a/dumux/flux/box/maxwellstefanslaw.hh b/dumux/flux/box/maxwellstefanslaw.hh
index c787c12b9b80c47a771ccb39969924059a4660d9..bda7cba701c6682ec21ad627cc0e3fc420a525c3 100644
--- a/dumux/flux/box/maxwellstefanslaw.hh
+++ b/dumux/flux/box/maxwellstefanslaw.hh
@@ -154,8 +154,6 @@ private:
 
         const auto& insideVolVars = elemVolVars[scvf.insideScvIdx()];
         const auto& outsideVolVars = elemVolVars[scvf.outsideScvIdx()];
-        const auto insideScvIdx = scvf.insideScvIdx();
-        const auto outsideScvIdx = scvf.outsideScvIdx();
 
         //this is to not devide by 0 if the saturation in 0 and the effectiveDiffusionCoefficient becomes zero due to that
         if(Dune::FloatCmp::eq<Scalar>(insideVolVars.saturation(phaseIdx), 0) || Dune::FloatCmp::eq<Scalar>(outsideVolVars.saturation(phaseIdx), 0))