diff --git a/CHANGELOG b/CHANGELOG
--- a/CHANGELOG
+++ b/CHANGELOG
@@ -1,5 +1,9 @@
 # Changelog for Hedis
 
+## 0.12.7
+
+* PR #139.  fix MonadFail instance
+
 ## 0.12.6
 
 * PR #138, Issue #137. Derive MonadFail for the Redis monad
diff --git a/hedis.cabal b/hedis.cabal
--- a/hedis.cabal
+++ b/hedis.cabal
@@ -1,5 +1,5 @@
 name:               hedis
-version:            0.12.6
+version:            0.12.7
 synopsis:
     Client library for the Redis datastore: supports full command set,
     pipelining.
diff --git a/src/Database/Redis/Core.hs b/src/Database/Redis/Core.hs
--- a/src/Database/Redis/Core.hs
+++ b/src/Database/Redis/Core.hs
@@ -1,6 +1,6 @@
 {-# LANGUAGE OverloadedStrings, GeneralizedNewtypeDeriving, RecordWildCards,
     MultiParamTypeClasses, FunctionalDependencies, FlexibleInstances, CPP,
-    DeriveDataTypeable #-}
+    DeriveDataTypeable, StandaloneDeriving #-}
 
 module Database.Redis.Core (
     Connection(..), ConnectError(..), connect, checkedConnect, disconnect,
@@ -17,7 +17,7 @@
 import Control.Applicative
 #endif
 import Control.Exception
-#if __GLASGOW_HASKELL__ >= 860
+#if __GLASGOW_HASKELL__ > 711
 import Control.Monad.Fail (MonadFail)
 #endif
 import Control.Monad.Reader
@@ -46,7 +46,7 @@
 newtype Redis a = Redis (ReaderT RedisEnv IO a)
     deriving (Monad, MonadIO, Functor, Applicative)
 
-#if __GLASGOW_HASKELL__ >= 860
+#if __GLASGOW_HASKELL__ > 711
 deriving instance MonadFail Redis
 #endif
 
