diff --git a/python_src/SAR_MultiSlc_IW.py b/python_src/SAR_MultiSlc_IW.py
index 2ed1cb87481e182a9a71f44f4cebde54251b5fd3..188cf0682f69f4522a70e03f74f0b7fc285b4de5 100644
--- a/python_src/SAR_MultiSlc_IW.py
+++ b/python_src/SAR_MultiSlc_IW.py
@@ -165,10 +165,18 @@ if __name__ == "__main__":
     ml_geoGrid_range = int(rng)
     ml_geoGrid_azimut = int(azi)
     gain_interfero = dict_DInSAR['parameter']['Interferogram_gain']
+    # esd loop 
+    esd_AutoMode = False # automatic mode to apply a threshold inside the esd loop
     esd_NbIter = 0
-    esd_AutoMode = "none"
+    
     if 'ESD_iter' in dict_DInSAR['parameter']:
-        esd_NbIter, esd_AutoMode = dict_DInSAR['parameter']['ESD_iter']
+        esd_NbIter = dict_DInSAR['parameter']['ESD_iter']
+        if not isinstance(esd_NbIter, int) :
+            esd_AutoMode = True
+            esd_NbIter = 10 # 10 iterations maximum for automatic mode
+    else :
+        esd_AutoMode = True
+        esd_NbIter = 10 # 10 iterations maximum for automatic mode
 
     # ====== Check Threshold
     if (geoGrid_threshold < 0) or (geoGrid_threshold > 1) :
diff --git a/python_src/processings/DInSar.py b/python_src/processings/DInSar.py
index 54bf010bbab865c4ce86fc6e1de4f847f46b3926..124246d3c8217ffd2565e5d404fdee76d5ea8723 100644
--- a/python_src/processings/DInSar.py
+++ b/python_src/processings/DInSar.py
@@ -134,7 +134,7 @@ def esd_correct_interferogram(validBurstMaster, validBurstSlave, master_Image_ba
         slave_Image_CoRe = os.path.splitext(slave_Image_base)[0] + "_burst" + str(burstId) + "_coregistrated.tif"
         coRe_path = os.path.join(esd_dir, slave_Image_CoRe)
         appCoRegistration = otb.Registry.CreateApplication("SARCoRegistration")
-        appCoRegistration.SetParameterString("insarmaster", os.path.join(burst_dir, burstDerampM))
+        appCoRegistration.SetParameterString("insarmaster", os.path.join(Master_burst_dir, burstDerampM))
         appCoRegistration.SetParameterString("insarslave", os.path.join(burst_dir, burstDerampS))
         appCoRegistration.SetParameterInputImage("ingrid", appGridOff.GetParameterOutputImage("out"))
         appCoRegistration.SetParameterInt("gridstepazimut", gridstepazimut)