diff --git a/Tests/test_orthofinder.py b/Tests/test_orthofinder.py
index 8aa8d2d8ac519c200d0029b074065e8987bdc723..1c602806038fb7500aa8d546a9db0771645038a1 100755
--- a/Tests/test_orthofinder.py
+++ b/Tests/test_orthofinder.py
@@ -34,7 +34,7 @@ exampleBlastDir = baseDir + "Input/SmallExampleDataset_ExampleBlastDir/"
 goldResultsDir_smallExample = baseDir + "ExpectedOutput/SmallExampleDataset/"
 goldPrepareBlastDir = baseDir + "ExpectedOutput/SmallExampleDataset_PreparedForBlast/"
 
-version = "1.0.7"
+version = "1.0.8"
 requiredBlastVersion = "2.2.28+"
 
 citation = """When publishing work that uses OrthoFinder please cite:
diff --git a/orthofinder/orthofinder.py b/orthofinder/orthofinder.py
index 7bbc206f33f896eae5158b53e42f67c308fe00a5..ce7441deac73411156e083e14b6c865f870ec287 100755
--- a/orthofinder/orthofinder.py
+++ b/orthofinder/orthofinder.py
@@ -55,9 +55,13 @@ if sys.platform.startswith("linux"):
     with open(os.devnull, "w") as f:
         subprocess.call("taskset -p 0xffffffffffff %d" % os.getpid(), shell=True, stdout=f) # get round problem with python multiprocessing library that can set all cpu affinities to a single cpu
          
-         
+my_env = os.environ.copy()
+if getattr(sys, 'frozen', False):
+#    my_env['LD_LIBRARY_PATH'] = my_env['LD_LIBRARY_PATH_ORIG']  
+    my_env['LD_LIBRARY_PATH'] = ''    
+     
 def RunBlastDBCommand(command):
-    capture = subprocess.Popen(command, stdout=subprocess.PIPE, stderr=subprocess.PIPE)
+    capture = subprocess.Popen(command, stdout=subprocess.PIPE, stderr=subprocess.PIPE, env=my_env)
     stdout = [x for x in capture.stdout]
     stderr = [x for x in capture.stderr]
     nLines_success= 10
diff --git a/orthofinder/scripts/get_orthologues.py b/orthofinder/scripts/get_orthologues.py
index ce4c5770491f965ae56cf65f16dbd238596f85fe..3fca659c4f10de06706ce4b776b5cd63c129e6ae 100755
--- a/orthofinder/scripts/get_orthologues.py
+++ b/orthofinder/scripts/get_orthologues.py
@@ -48,6 +48,10 @@ import orthologues_from_recon_trees as pt
 import blast_file_processor as BlastFileProcessor
 
 nThreads = util.nThreadsDefault
+my_env = os.environ.copy()
+if getattr(sys, 'frozen', False):
+#    my_env['LD_LIBRARY_PATH'] = my_env['LD_LIBRARY_PATH_ORIG']  
+    my_env['LD_LIBRARY_PATH'] = ''   
 
 class Seq(object):
     def __init__(self, seqInput):
@@ -208,7 +212,7 @@ def RunAstral(ogSet, treesPat, workingDir):
     treesFN = dir_astral + "TreesFile.txt"
     ConcatenateTrees(i_ogs_to_use, treesPat, treesFN)
     speciesTreeFN = workingDir + "SpeciesTree_astral.txt"
-    subprocess.call(" ".join(["java", "-Xmx6000M", "-jar", "~/software/ASTRAL-multiind/Astral/astral.4.8.0.jar", "-a", tmFN, "-i", treesFN, "-o", speciesTreeFN]), shell=True)
+    subprocess.call(" ".join(["java", "-Xmx6000M", "-jar", "~/software/ASTRAL-multiind/Astral/astral.4.8.0.jar", "-a", tmFN, "-i", treesFN, "-o", speciesTreeFN]), shell=True, env=my_env)
     return speciesTreeFN
 
 # ==============================================================================================================================      
@@ -455,7 +459,7 @@ def RunDlcpar(treesPat, ogSet, nOGs, speciesTreeFN, workingDir):
 
     filenames = [dlcparResultsDir + os.path.split(treesPat % i)[1] for i in xrange(nOGs)]
     
-    dlcCommands = ['dlcpar_search -s %s -S %s -D 1 -C 0.125 %s -I .txt' % (speciesTreeFN, geneMapFN, fn) for fn in filenames]
+    dlcCommands = ['dlcpar_search -s %s -S %s -D 1 -C 0.125 %s -I .txt -x 1' % (speciesTreeFN, geneMapFN, fn) for fn in filenames]
 #    print(dlcCommands[0])
     # use this to run in parallel
     util.RunParallelOrderedCommandLists(nThreads, [[c] for c in dlcCommands], qHideStdout = True)
diff --git a/orthofinder/scripts/util.py b/orthofinder/scripts/util.py
index ce7118ae672d64e23c9ed3ab546cfb3128d7c205..b9d3c1f86edc1a13334d65661cc5b6c71ba17610 100644
--- a/orthofinder/scripts/util.py
+++ b/orthofinder/scripts/util.py
@@ -47,7 +47,12 @@ SequencesInfo = namedtuple("SequencesInfo", "nSeqs nSpecies speciesToUse seqStar
 FileInfo = namedtuple("FileInfo", "inputDir outputDir graphFilename")     
 
 picProtocol = 1
-version = "1.0.7"
+version = "1.0.8"
+
+my_env = os.environ.copy()
+if getattr(sys, 'frozen', False):
+#    my_env['LD_LIBRARY_PATH'] = my_env['LD_LIBRARY_PATH_ORIG']  
+    my_env['LD_LIBRARY_PATH'] = ""  
 
 def PrintNoNewLine(text):
     sys.stdout.write(text)
@@ -61,19 +66,19 @@ Command & parallel command management
 """
 
 def RunCommand(command):
-    subprocess.call(command)
+    subprocess.call(command, env=my_env)
             
 def RunOrderedCommandList(commandSet, qHideStdout):
     if qHideStdout:
         for cmd in commandSet:
-            subprocess.call(cmd, shell=True, stdout=subprocess.PIPE)
+            subprocess.call(cmd, shell=True, stdout=subprocess.PIPE, env=my_env)
     else:
         for cmd in commandSet:
-            subprocess.call(cmd, shell=True)
+            subprocess.call(cmd, shell=True, env=my_env)
     
 def CanRunCommand(command, qAllowStderr = False):
     PrintNoNewLine("Test can run \"%s\"" % command)       # print without newline
-    capture = subprocess.Popen(command, shell=True, stdout=subprocess.PIPE, stderr=subprocess.PIPE)
+    capture = subprocess.Popen(command, shell=True, stdout=subprocess.PIPE, stderr=subprocess.PIPE, env=my_env)
     stdout = [x for x in capture.stdout]
     stderr = [x for x in capture.stderr]
     if len(stdout) > 0 and (qAllowStderr or len(stderr) == 0):
@@ -90,7 +95,7 @@ def Worker_RunCommand(cmd_queue, nProcesses, nToDo):
             nDone = i - nProcesses + 1
             if nDone >= 0 and divmod(nDone, 10 if nToDo <= 200 else 100 if nToDo <= 2000 else 1000)[1] == 0:
                 PrintTime("Done %d of %d" % (nDone, nToDo))
-            subprocess.call(command)
+            subprocess.call(command, env=my_env)
         except Queue.Empty:
             return