diff --git a/dbus.cabal b/dbus.cabal
--- a/dbus.cabal
+++ b/dbus.cabal
@@ -1,6 +1,6 @@
 cabal-version:      >=1.10
 name:               dbus
-version:            1.2.22
+version:            1.2.23
 license:            Apache-2.0
 license-file:       license.txt
 maintainer:         Andrey Sverdlichenko <blaze@ruddy.ru>
@@ -107,7 +107,7 @@
         parsec <3.2,
         random <1.3,
         split <0.3,
-        template-haskell <2.18.0.0,
+        template-haskell ==2.18.*,
         text <1.3,
         th-lift <0.9,
         transformers <0.6,
diff --git a/lib/DBus/Generation.hs b/lib/DBus/Generation.hs
--- a/lib/DBus/Generation.hs
+++ b/lib/DBus/Generation.hs
@@ -148,7 +148,7 @@
 makeFromVariantApp name = AppE (VarE 'T.fromVariant) $ VarE name
 
 makeJustPattern :: Name -> Pat
-makeJustPattern name = ConP 'Just [VarP name]
+makeJustPattern name = ConP 'Just [] [VarP name]
 
 mapOrHead ::
   (Num a, Eq a) => a -> (t -> b) -> [t] -> ([b] -> b) -> b
