diff --git a/CHANGELOG.md b/CHANGELOG.md
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -1,3 +1,7 @@
+# 0.1.0.1
+
+Fix elaboration bug that cause a compiler panic
+
 # 0.1
 
 First release.
diff --git a/WidgetRattus.cabal b/WidgetRattus.cabal
--- a/WidgetRattus.cabal
+++ b/WidgetRattus.cabal
@@ -1,6 +1,6 @@
 cabal-version:       1.18
 name:                WidgetRattus
-version:             0.1
+version:             0.1.0.1
 category:            FRP
 synopsis:            An asynchronous modal FRP language
 description:
@@ -57,7 +57,7 @@
                        hashtables >= 1.3.1 && < 1.4,
                        simple-affine-space >= 0.2.1 && < 0.3,
                        transformers >= 0.5.6 && < 0.7,
-                       template-haskell >= 2.19 && < 2.22
+                       template-haskell >= 2.17 && < 2.22
   hs-source-dirs:      src
   default-language:    Haskell2010
   ghc-options:         -W
diff --git a/src/AsyncRattus/Plugin/Transform.hs b/src/AsyncRattus/Plugin/Transform.hs
--- a/src/AsyncRattus/Plugin/Transform.hs
+++ b/src/AsyncRattus/Plugin/Transform.hs
@@ -107,8 +107,8 @@
     let firstPrimInfo = foldl (\acc (p, _) -> acc <|> p) primInfo transformed
     let alts' = map snd transformed
     return (Case expr b t alts', firstPrimInfo)
-transform' ctx (Cast e _) = transform' ctx e
-transform' ctx (Tick _ e) = transform' ctx e
+transform' ctx (Cast e c) = do (e' , p) <- transform' ctx e; return (Cast e' c, p)
+transform' ctx (Tick t e) = do (e' , p) <- transform' ctx e; return (Tick t e', p)
 transform' _ e = return (e, Nothing)
 
 constructClockExtractionCode :: PrimInfo -> CoreM CoreExpr
