diff --git a/dumux/flux/box/maxwellstefanslaw.hh b/dumux/flux/box/maxwellstefanslaw.hh
index 854a1222a1b7c0727dc6738dd370acf25920a57c..50ec3de2220acd75e763715b579aabc54de66ab3 100644
--- a/dumux/flux/box/maxwellstefanslaw.hh
+++ b/dumux/flux/box/maxwellstefanslaw.hh
@@ -156,8 +156,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))