diff --git a/ChangeLog b/ChangeLog
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2019-12-19 - 0.3.2
+
+	* Compile windows wrapper script in a a more appropiate directory. (#109)
+	* Fix situation in wrapper script when environmental variable wasn't set. (#109)
+
 2019-12-18 - 0.3.1
 
 	* Fix bug in the windows wrapper script (#108)
diff --git a/hie-bios.cabal b/hie-bios.cabal
--- a/hie-bios.cabal
+++ b/hie-bios.cabal
@@ -1,6 +1,6 @@
 Cabal-Version:          2.2
 Name:                   hie-bios
-Version:                0.3.1
+Version:                0.3.2
 Author:                 Matthew Pickering <matthewtpickering@gmail.com>
 Maintainer:             Matthew Pickering <matthewtpickering@gmail.com>
 License:                BSD-3-Clause
diff --git a/src/HIE/Bios/Cradle.hs b/src/HIE/Bios/Cradle.hs
--- a/src/HIE/Bios/Cradle.hs
+++ b/src/HIE/Bios/Cradle.hs
@@ -302,8 +302,8 @@
 -- generate a fake GHC that can be passed to cabal
 -- when run with --interactive, it will print out its
 -- command-line arguments and exit
-getCabalWrapperTool :: GhcProc -> IO FilePath
-getCabalWrapperTool (ghcPath, ghcArgs) = do
+getCabalWrapperTool :: GhcProc -> FilePath -> IO FilePath
+getCabalWrapperTool (ghcPath, ghcArgs) wdir = do
   wrapper_fp <-
     if isWindows
       then do
@@ -317,7 +317,7 @@
             writeFile wrapper_hs cabalWrapperHs
             createDirectoryIfMissing True cacheDir
             let ghc = (proc ghcPath $ ghcArgs ++ ["-o", wrapper_fp, wrapper_hs])
-                        { cwd = Just (takeDirectory wrapper_hs) }
+                        { cwd = Just wdir }
             readCreateProcess ghc "" >>= putStr
         return wrapper_fp
       else writeSystemTempFile "bios-wrapper" cabalWrapper
@@ -328,7 +328,7 @@
 
 cabalAction :: FilePath -> Maybe String -> LoggingFunction -> FilePath -> IO (CradleLoadResult ComponentOptions)
 cabalAction work_dir mc l _fp = do
-  wrapper_fp <- getCabalWrapperTool ("ghc", [])
+  wrapper_fp <- getCabalWrapperTool ("ghc", []) work_dir
   let cab_args = ["v2-repl", "--with-compiler", wrapper_fp]
                   ++ [component_name | Just component_name <- [mc]]
   (ex, output, stde, args) <-
@@ -385,7 +385,7 @@
 stackAction work_dir mc l _fp = do
   let ghcProcArgs = ("stack", ["exec", "ghc", "--"])
   -- Same wrapper works as with cabal
-  wrapper_fp <- getCabalWrapperTool ghcProcArgs
+  wrapper_fp <- getCabalWrapperTool ghcProcArgs work_dir
 
   (ex1, _stdo, stde, args) <-
     readProcessWithOutputFile l Nothing work_dir
diff --git a/wrappers/cabal.hs b/wrappers/cabal.hs
--- a/wrappers/cabal.hs
+++ b/wrappers/cabal.hs
@@ -1,7 +1,7 @@
 module Main (main) where
 
 import System.Directory (getCurrentDirectory)
-import System.Environment (getArgs, getEnv)
+import System.Environment (getArgs, getEnv, lookupEnv)
 import System.Exit (exitWith)
 import System.Process (spawnProcess, waitForProcess)
 import System.IO (openFile, hClose, hPutStrLn, IOMode(..))
@@ -10,7 +10,7 @@
   args <- getArgs
   output_file <- getEnv "HIE_BIOS_OUTPUT"
   ghcPath <- getEnv "HIE_BIOS_GHC"
-  ghcPathArgs <- fmap words (getEnv "HIE_BIOS_GHC_ARGS")
+  ghcPathArgs <- fmap (maybe [] words) (lookupEnv "HIE_BIOS_GHC_ARGS")
   case args of
     "--interactive":_ -> do
       h <- openFile output_file AppendMode
