diff --git a/CHANGELOG.md b/CHANGELOG.md
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -1,3 +1,7 @@
+## 0.2.1.0 -- 2023-08-29
+
+* Fix encoder generation bug (https://github.com/awkward-squad/hasql-interpolate/pull/10)
+
 ## 0.2.0.0 -- 2023-08-17
 
 * Relax context of tuple instances for `EncodeRow` from `EncodeValue` to `EncodeField` (https://github.com/awkward-squad/hasql-interpolate/pull/9)
diff --git a/hasql-interpolate.cabal b/hasql-interpolate.cabal
--- a/hasql-interpolate.cabal
+++ b/hasql-interpolate.cabal
@@ -1,6 +1,6 @@
 cabal-version:      2.4
 name:               hasql-interpolate
-version:            0.2.0.0
+version:            0.2.1.0
 
 author: Travis Staton <hello@travisstaton.com>
 category: Hasql, Database, PostgreSQL
diff --git a/lib/Hasql/Interpolate/Internal/TH.hs b/lib/Hasql/Interpolate/Internal/TH.hs
--- a/lib/Hasql/Interpolate/Internal/TH.hs
+++ b/lib/Hasql/Interpolate/Internal/TH.hs
@@ -319,9 +319,9 @@
      in foldr go [e|pure mempty|] sqlBuilder
   encExp <-
     let go a b = case a of
-          Pe'Exp x -> [e|$(pure x) >$ E.param encodeField <> $b|]
+          Pe'Exp x -> [e|($(pure x) >$ E.param encodeField) <> $b|]
           Pe'Var x -> [e|$(varE (nameArr ! x)) <> $b|]
-     in foldr go [e|mempty|] enc
+     in foldr go [e|E.noParams|] enc
   body <- [e|Sql (getAp $(pure sqlBuilderExp)) $(pure encExp)|]
   pure case spliceDecs of
     [] -> body
diff --git a/test/Main.hs b/test/Main.hs
--- a/test/Main.hs
+++ b/test/Main.hs
@@ -53,7 +53,8 @@
         <$> [ testCase "basic" . testBasic,
               testCase "composite test" . testComposite,
               testCase "row" . testRow,
-              testCase "row generic" . testRowGeneric
+              testCase "row generic" . testRowGeneric,
+              testCase "snippet" . testSnippet
             ]
     )
 
@@ -146,6 +147,15 @@
   withLocalTransaction getDb \conn -> do
     let expected = [Point 0 0, Point 1 1]
     res <- run conn [sql| select * from (values (0,0), (1,1) ) as t |]
+    res @?= expected
+
+testSnippet :: IO Tmp.DB -> IO ()
+testSnippet getDb = do
+  withLocalTransaction getDb \conn -> do
+    let expected = [Point 0 0]
+    let snippet = [sql| t.y = 0 |]
+    let xVal :: Int64 = 0
+    res <- run conn [sql| select * from (values (0,0), (1,1) ) as t(x,y) where t.x = #{xVal} and ^{snippet} |]
     res @?= expected
 
 withLocalTransaction :: IO Tmp.DB -> (Hasql.Connection -> IO a) -> IO a
