diff --git a/README.md b/README.md
--- a/README.md
+++ b/README.md
@@ -1,7 +1,7 @@
 [![Travis CI Status](https://travis-ci.org/jfischoff/tmp-postgres.svg?branch=master)](http://travis-ci.org/jfischoff/tmp-postgres)
 # tmp-postgres
 
-`tmp-postgres` is a libary for greating a temporary `postgres` instance on a random port for testing.
+`tmp-postgres` is a library for creating a temporary `postgres` instance on a random port for testing.
 
 ```haskell
 result <- start []
@@ -12,7 +12,7 @@
      stop tempDB
 ```
 
-#Installation
+# Installation
 
 ## macOS
 ```
diff --git a/src/Database/Postgres/Temp/Internal.hs b/src/Database/Postgres/Temp/Internal.hs
--- a/src/Database/Postgres/Temp/Internal.hs
+++ b/src/Database/Postgres/Temp/Internal.hs
@@ -1,4 +1,4 @@
-{-# LANGUAGE RecordWildCards, LambdaCase, ScopedTypeVariables #-}
+{-# LANGUAGE RecordWildCards, LambdaCase, ScopedTypeVariables, DeriveDataTypeable #-}
 module Database.Postgres.Temp.Internal where
 import System.IO.Temp
 import System.Process
@@ -10,6 +10,7 @@
 import Network.Socket
 import Control.Exception
 import Data.Typeable
+import System.Posix.Signals
 
 openFreePort :: IO Int
 openFreePort = bracket (socket AF_INET Stream defaultProtocol) close $ \s -> do
@@ -46,9 +47,9 @@
 fourth :: (a, b, c, d) -> d
 fourth (_, _, _, x) = x
 
-shellWith :: Handle -> Handle -> String -> CreateProcess
-shellWith stdOut stdErr cmd =
-  (shell cmd)
+procWith :: Handle -> Handle -> String -> [String] -> CreateProcess
+procWith stdOut stdErr cmd args =
+  (proc cmd args)
     { std_err = UseHandle stdErr
     , std_out = UseHandle stdOut
     }
@@ -85,9 +86,9 @@
         ClosedHandle _ -> return ""
         )
 
-runProcessWith :: Handle -> Handle -> String -> String -> IO ExitCode
-runProcessWith stdOut stdErr name cmd
-  =   createProcess_ name (shellWith stdOut stdErr cmd)
+runProcessWith :: Handle -> Handle -> String -> String -> [String] -> IO ExitCode
+runProcessWith stdOut stdErr name cmd args
+  =   createProcess_ name (procWith stdOut stdErr cmd args)
   >>= waitForProcess . fourth
 
 -- | Start postgres and pass in handles for stdout and stderr
@@ -134,7 +135,7 @@
 
   logger InitDB
   initDBExitCode <- runProcessWith stdOut stdErr "initdb"
-      ("initdb --nosync -E UNICODE -A trust -D " ++ dataDir)
+      "initdb" ["-E", "UNICODE", "-A", "trust", "-D", dataDir]
   throwIfError InitDBFailed initDBExitCode
 
   logger WriteConfig
@@ -145,16 +146,12 @@
   -- slight race here, the port might not be free anymore!
   let connectionString = "postgresql:///test?host=" ++ mainDir ++ "&port=" ++ show port
   logger StartPostgres
-  let extraOptions = unwords $ map (\(key, value) -> "--" ++ key ++ "=" ++ value) options
+  let extraOptions = map (\(key, value) -> "--" ++ key ++ "=" ++ value) options
   bracketOnError ( fmap (DB mainDir connectionString . fourth)
                  $ createProcess_ "postgres"
-                     ( shellWith stdOut stdErr
-                     $ "postgres -D "
-                     ++ dataDir
-                     ++ " -p "
-                     ++ show port
-                     ++ " "
-                     ++ extraOptions
+                     ( procWith stdOut stdErr
+                      "postgres"
+                      $ ["-D", dataDir, "-p", show port] ++ extraOptions
                      )
                  )
                  stop
@@ -165,10 +162,7 @@
     logger CreateDB
     throwIfError CreateDBFailed =<<
       runProcessWith stdOut stdErr "createDB"
-        ( "createDB --host=" ++ mainDir
-        ++ " --port=" ++ show port
-        ++ " test"
-        )
+        "createdb" ["-h", mainDir, "-p", show port, "test"]
 
     logger Finished
     return result
@@ -188,7 +182,11 @@
 -- | Stop postgres and clean up the temporary database folder.
 stop :: DB -> IO ExitCode
 stop DB {..} = do
-  terminateProcess pid
+  withProcessHandle pid (\case
+         OpenHandle p   -> signalProcess sigINT p
+         ClosedHandle _ -> return ()
+         )
+
   result <- waitForProcess pid
   removeDirectoryRecursive mainDir
   return result
diff --git a/test/Database/Postgres/Temp/InternalSpec.hs b/test/Database/Postgres/Temp/InternalSpec.hs
--- a/test/Database/Postgres/Temp/InternalSpec.hs
+++ b/test/Database/Postgres/Temp/InternalSpec.hs
@@ -1,4 +1,4 @@
-{-# LANGUAGE OverloadedStrings #-}
+{-# LANGUAGE OverloadedStrings, DeriveDataTypeable #-}
 module Database.Postgres.Temp.InternalSpec (main, spec) where
 import Test.Hspec
 import System.IO.Temp
@@ -12,6 +12,7 @@
 import Database.PostgreSQL.Simple
 import qualified Data.ByteString.Char8 as BSC
 import System.Exit
+import Control.Applicative ((<$>))
 
 main :: IO ()
 main = hspec spec
diff --git a/tmp-postgres.cabal b/tmp-postgres.cabal
--- a/tmp-postgres.cabal
+++ b/tmp-postgres.cabal
@@ -1,8 +1,8 @@
 name:                tmp-postgres
-version:             0.1.0.7
+version:             0.1.0.8
 synopsis: Start and stop a temporary postgres for testing
 description:
- This module provides functions greating a temporary postgres instance on a random port for testing.
+ This module provides functions creating a temporary postgres instance on a random port for testing.
  .
  > result <- start []
  > case result of
@@ -15,7 +15,7 @@
  methods of dealing with @stdout@ and @stderr@.
  .
  The start methods use a config based on the one used by pg_tmp (http://ephemeralpg.org/), but can be overriden
- by in different values to the first argument of the start functions.
+ by different values to the first argument of the start functions.
  .
  WARNING!!
  Ubuntu's PostgreSQL installation does not put @initdb@ on the @PATH@. We need to add it manually. The necessary binaries are in the @\/usr\/lib\/postgresql\/VERSION\/bin\/@ directory, and should be added to the @PATH@
@@ -39,7 +39,7 @@
                  , Database.Postgres.Temp.Internal
   build-depends: base >= 4.6 && < 5
                , temporary
-               , process
+               , process >= 1.2.0.0
                , unix
                , directory
                , network
