diff --git a/Yesod/Fay.hs b/Yesod/Fay.hs
--- a/Yesod/Fay.hs
+++ b/Yesod/Fay.hs
@@ -116,7 +116,7 @@
 jsMainCall :: Bool -> String -> Builder
 jsMainCall False _ = mempty
 jsMainCall True mn' =
-    "Fay$$_(" <> mn <> "$main);"
+    "Fay$$_(" <> mn <> ".main);"
   where
     mn = fromText $ T.pack mn'
 
diff --git a/yesod-fay.cabal b/yesod-fay.cabal
--- a/yesod-fay.cabal
+++ b/yesod-fay.cabal
@@ -2,7 +2,7 @@
 -- documentation, see http://haskell.org/cabal/users-guide/
 
 name:                yesod-fay
-version:             0.4.0.2
+version:             0.4.0.3
 synopsis:            Utilities for using the Fay Haskell-to-JS compiler with Yesod.
 description:         For initial discussion, see <http://www.yesodweb.com/blog/2012/10/yesod-fay-js>. This is a work-in-progress.
 homepage:            https://github.com/snoyberg/yesod-fay
