diff --git a/morte.cabal b/morte.cabal
--- a/morte.cabal
+++ b/morte.cabal
@@ -1,5 +1,5 @@
 Name: morte
-Version: 1.6.4
+Version: 1.6.5
 Cabal-Version: >=1.8.0.2
 Build-Type: Simple
 Tested-With: GHC == 7.6.3, GHC == 7.8.4, GHC == 7.10.2, GHC == 8.0.1
@@ -44,7 +44,7 @@
         http-client-tls      >= 0.2.0    && < 0.4 ,
         microlens            >= 0.2.0.0  && < 0.5 ,
         microlens-mtl        >= 0.1.3.1  && < 0.2 ,
-        pipes                >= 4.0.0    && < 4.3 ,
+        pipes                >= 4.0.0    && < 4.4 ,
         system-filepath      >= 0.3.1    && < 0.5 ,
         system-fileio        >= 0.2.1    && < 0.4 ,
         text                 >= 0.11.1.0 && < 1.3 ,
diff --git a/src/Morte/Core.hs b/src/Morte/Core.hs
--- a/src/Morte/Core.hs
+++ b/src/Morte/Core.hs
@@ -587,7 +587,7 @@
           where
             a' = shift 1 x a
             b' = subst x 0 a' b
-        _          -> e
+        f'         -> App f' a
     _       -> e
 
 -- | Returns whether a variable is free in an expression
