diff --git a/generic-aeson.cabal b/generic-aeson.cabal
--- a/generic-aeson.cabal
+++ b/generic-aeson.cabal
@@ -1,5 +1,5 @@
 name:                generic-aeson
-version:             0.2.0.13
+version:             0.2.0.14
 synopsis:            Derivation of Aeson instances using GHC generics.
 description:         Derivation of Aeson instances using GHC generics.
 author:              Silk
@@ -27,13 +27,13 @@
     Generics.Generic.Aeson.Util
     Generics.Generic.IsEnum
   build-depends:
-      base >= 4.4 && < 4.16
-    , aeson >= 0.6 && < 2.1
+      base >= 4.4 && < 4.17
+    , aeson >= 0.6 && < 2.2
     , attoparsec >= 0.11 && < 0.15
     , generic-deriving >= 1.6 && < 1.15
-    , mtl >= 2.0 && < 2.3
+    , mtl >= 2.0 && < 2.4
     , tagged >= 0.2 && < 0.9
-    , text >= 0.11 && < 1.3
+    , text >= 0.11 && < 2.1
     , unordered-containers == 0.2.*
     , vector >= 0.10 && < 0.13
   if impl(ghc < 7.6)
diff --git a/src/Generics/Generic/Aeson.hs b/src/Generics/Generic/Aeson.hs
--- a/src/Generics/Generic/Aeson.hs
+++ b/src/Generics/Generic/Aeson.hs
@@ -42,6 +42,7 @@
   ) where
 
 import Control.Applicative
+import Control.Monad (unless, when)
 import Control.Monad.State
 import Data.Aeson
 import Data.Aeson.Types hiding (GFromJSON, GToJSON)
