diff --git a/changelog b/changelog
--- a/changelog
+++ b/changelog
@@ -71,3 +71,6 @@
 	* fix the repo location in the cabal file
 	* fix smart rotate to not rotate keys it cannot access
 	* add password manager
+
+0.5.1.1 Chris Dornan <chrisd@irisconnect.co.uk> 2014-09-08
+	* fixsetEnv usage to work with GHCs 7.6.3 & 7.8.3
diff --git a/keystore.cabal b/keystore.cabal
--- a/keystore.cabal
+++ b/keystore.cabal
@@ -1,5 +1,5 @@
 Name:                   keystore
-Version:                0.5.1.0
+Version:                0.5.1.1
 Synopsis:               Managing stores of secret things
 Homepage:               http://github.com/cdornan/keystore
 Author:                 Chris Dornan
diff --git a/src/Data/KeyStore/PasswordManager.hs b/src/Data/KeyStore/PasswordManager.hs
--- a/src/Data/KeyStore/PasswordManager.hs
+++ b/src/Data/KeyStore/PasswordManager.hs
@@ -63,7 +63,8 @@
 import           Control.Exception
 import           Control.Monad
 import           System.Directory
-import           System.Environment
+import qualified System.Environment                       as E
+import           System.SetEnv
 import           System.Exit
 import           System.IO
 import           System.Locale
@@ -710,7 +711,7 @@
   error $ if ex then _pmc_password_msg else _pmc_keystore_msg
 
 get_key' :: PW p => PMConfig p -> IO (Maybe AESKey)
-get_key' PMConfig{..} = fmap mk_aek' <$> lookupEnv var
+get_key' PMConfig{..} = fmap mk_aek' <$> E.lookupEnv var
   where
     var = T.unpack $ _EnvVar _pmc_env_var
 
@@ -1006,14 +1007,14 @@
   case execParserPure (prefs idm) pinfo args of
     Success a -> return a
     Failure failure -> do
-      progn <- getProgName
+      progn <- E.getProgName
       let (msg, exit) = execFailure failure progn
       case exit of
         ExitSuccess -> putStrLn msg
         _           -> hPutStrLn stderr msg
       exitWith exit
     CompletionInvoked compl -> do
-      progn <- getProgName
+      progn <- E.getProgName
       msg   <- execCompletion compl progn
       putStr msg
       exitWith ExitSuccess
diff --git a/src/Data/KeyStore/Version.hs b/src/Data/KeyStore/Version.hs
--- a/src/Data/KeyStore/Version.hs
+++ b/src/Data/KeyStore/Version.hs
@@ -6,4 +6,4 @@
     (a,b,c,d) = versionTuple
 
 versionTuple :: (Int,Int,Int,Int)
-versionTuple = (0,5,1,0)
+versionTuple = (0,5,1,1)
