             js["magnetic_field"]["params"]);
     //create a grid generator
     std::string type = js["grid"]["generator"]["type"].asString();
-    int mode = js["grid"]["generator"]["mode"].asInt();
+    int mode = 0;
+    if( type != "dsp")
+        mode = js["grid"]["generator"]["mode"].asInt();
     std::cout << "Constructing "<<type<<" grid ... \n";
     if( type == "flux")
         generator = std::make_unique<dg::geo::FluxGenerator>( mag.get_psip(),

                mag.get_psip(), lc, psi_0, psi_1, mag.R0(), 0., psi_init,
                mode%2);
        }
    }
    else if( type == "ribeiro-flux")
        generator = std::make_unique<dg::geo::RibeiroFluxGenerator>( mag.get_psip(),

#include "make_field.h"
#include "flux.h"
#include "simple_orthogonal.h"
#include "ds_generator.h"
#include "ribeiro.h"
#include "hector.h"

