diff --git a/cfg/blueberry/launch.cfg b/cfg/blueberry/launch.cfg
index 12256a89f06c5501b848f3489ea602aed964e83d..d66afc51905cfa52f06df5c21904031fed7df37f 100644
--- a/cfg/blueberry/launch.cfg
+++ b/cfg/blueberry/launch.cfg
@@ -1,4 +1,4 @@
-self.pars['NB_THREADS'].val='6'
+self.pars['NB_THREADS'].val='4'
 self.pars['NB_TASKS'].val='1'
 self.pars['RUNMETHOD'].vals=['interactive','at','batch']
 self.pars['RUNMETHOD'].val='batch'
diff --git a/parametricJob.py b/parametricJob.py
index ce51a0fc6c81bb586c95c9f7b80984769bcbfa25..95d7d018b2098b2039a85910bd7c904326e525aa 100644
--- a/parametricJob.py
+++ b/parametricJob.py
@@ -296,7 +296,8 @@ class ParametricJob(PRMSet):
         #file.write("jobId=`atq | awk '{if ($1>jobId)jobId=$1} END {print jobId}'`\n")
         #file.write("echo \"at JobId = $jobId\"\n")
         #file.write('%s -x -i $jobId -d "%s"\n' % (sys.argv[0], os.getcwd()) )
-        file.write('%s -x -i %d -d "%s"\n' % (sys.argv[0], launchId, os.getcwd()) )
+        script =  re.sub(r'(.+)Gui.pyw',r'\1.py', sys.argv[0]) #if launched through a Gui => use the basic script instead in batch
+        file.write('%s -x -i %d -d "%s"\n' % (script, launchId, os.getcwd()) )
         file.close()
         os.chmod(scriptname,0o700)
         
@@ -331,7 +332,9 @@ class ParametricJob(PRMSet):
                 print("\t\t - '=' means running")
                 print("\tuse 'atrm %s to kill the job" % batchId)
                 print("\t\t  or 'atrm%s.py' to kill the job" % batchId)
-        sys.exit()
+        # to avoid closing the gui
+        if not (re.match(r'(.+)Gui.pyw', sys.argv[0])): 
+            sys.exit()
 
     def atrmScript(self, pid):
         filename = "atrm%s.py"%pid
@@ -391,7 +394,10 @@ class ParametricJob(PRMSet):
             file.write("#$ %s\n" % self.pars['SGEARGS'].val)
         import socket
         file.write(". %s %s\n" % (cfgfile,socket.gethostname()))
-        file.write("%s -x -i $JOB_ID\n" % (sys.argv[0]))
+        #file.write('%s -x -i $jobId -d "%s"\n' % (sys.argv[0], os.getcwd()) )
+        script =  re.sub(r'(.+)Gui.pyw',r'\1.py', sys.argv[0])
+        file.write("%s -x -i $JOB_ID\n" % (script))
+        #file.write("%s -x -i $JOB_ID\n" % (sys.argv[0]))
         file.close()
         # send to sge
         print("sending job '%s' to SGE" % jobname)
@@ -415,7 +421,9 @@ class ParametricJob(PRMSet):
                 print("\tuse './%s' to get results from node disk" % self.cpNodeResultsScriptName(sgeId))
                 print("\tuse './%s' to clean results from node disk" % self.rmNodeResultsScriptName(sgeId))
                 print("\tuse './qDel%s.py' to kill your job, get results and clean node disk" % sgeId)
-        sys.exit()
+        # to avoid closing the gui
+        if not (re.match(r'(.+)Gui.pyw', sys.argv[0])): 
+            sys.exit()
 
     def qDelScriptName(self, jobId):
         filename = "qDel%s.py"%jobId
@@ -483,7 +491,8 @@ class ParametricJob(PRMSet):
         #file.write("echo 'squeue'\n")
         import socket
         file.write(". %s %s\n" % (cfgfile, socket.gethostname()))
-        file.write("srun %s -x -i $SLURM_JOB_ID \n" % (sys.argv[0]))
+        script =  re.sub(r'(.+)Gui.pyw',r'\1.py', sys.argv[0])
+        file.write("srun %s -x -i $SLURM_JOB_ID \n" % (script))
         file.close()
         os.chmod(scriptname,0o700)
         # send to slurm
@@ -508,7 +517,10 @@ class ParametricJob(PRMSet):
                 print("\tuse ' sstat  -a --format=JobID,NTasks,MaxRSS,MaxVMSize -j %s ' to get information about your running job (adapt format to your needs)" % slurmId)
                 print("\tuse ' scancel %s ' to kill your job" % slurmId)
                 print("\tuse ' sacct --format=JobID,NTasks,NCPUS,CPUTime,Elapsed,MaxRSS,MaxVMSize -j %s ' to get information about your finished job (adapt format to your needs)" % slurmId)
-        sys.exit()
+                
+        # to avoid closing the gui
+        if not (re.match(r'(.+)Gui.pyw', sys.argv[0])): 
+            sys.exit()
 
     def sCancelScriptName(self, jobId):
         filename = "sCancel%s.py"%jobId
@@ -608,7 +620,8 @@ class ParametricJob(PRMSet):
         # Lanch the job        
         import socket
         file.write('. %s %s\n' % (cfgfile, socket.gethostname()))
-        file.write('%s -x -i $PBS_JOBID\n' % (sys.argv[0]))
+        script =  re.sub(r'(.+)Gui.pyw',r'\1.py', sys.argv[0])
+        file.write('%s -x -i $PBS_JOBID\n' % (script))
         file.write('qstat -f $PBS_JOBID\n')
         file.close()
         os.chmod(scriptname,0o700)
@@ -648,7 +661,9 @@ class ParametricJob(PRMSet):
                 print "\tuse ' qdel %s ' to kill your job" % PbsId
                 #print "\tuse ' sacct --format=JobID,NTasks,NCPUS,CPUTime,Elapsed,MaxRSS,MaxVMSize -j %s ' to get information about your finished job (adapt format to your needs)" % PbsId
              '''
-        sys.exit()
+        # to avoid closing the gui
+        if not (re.match(r'(.+)Gui.pyw', sys.argv[0])): 
+            sys.exit()
 
     def PBSCancelScriptName(self, jobId):
         filename = "qdel%s.py"%jobId
diff --git a/postProLoop.py b/postProLoop.py
index d66fdfebe1b97d646e83b7b1d22259670d0e9e16..d09e9e2274edd7c8eebc7c49a1e5453daed21051 100755
--- a/postProLoop.py
+++ b/postProLoop.py
@@ -148,10 +148,10 @@ class PostProLoop(PRMSet):
         if shutil.which(self.pars[key].val):
             return True
         else:
-            print "%s is not found (%s)...."%self.pars[key].val
-            print "\t Check installation and accessibility..."
-            print "\t Use 'externalProgramPathGui' to define the full program path (recommanded)"
-            print "\t or add %s in your user path (not recommanded)"%key
+            print ("%s is not found (%s)...."%self.pars[key].val)
+            print ("\t Check installation and accessibility...")
+            print ("\t Use 'externalProgramPathGui' to define the full program path (recommanded)")
+            print ("\t or add %s in your user path (not recommanded)"%key)
             return False
         '''
         if distutils.spawn.find_executable(os.path.splitext(self.pars[key].val)[0]):