diff --git a/Yesod/Internal/Core.hs b/Yesod/Internal/Core.hs
--- a/Yesod/Internal/Core.hs
+++ b/Yesod/Internal/Core.hs
@@ -599,6 +599,7 @@
     $nothing
         <script>^{jelper j}
 |]
+
         headAll = [HAMLET|
 \^{head'}
 $forall s <- stylesheets
@@ -615,16 +616,17 @@
         $nothing
             <style>#{content}
 $case jsLoader master
+  $of BottomOfBody
   $of BottomOfHeadAsync asyncJsLoader
       ^{asyncJsLoader asyncScripts mcomplete}
   $of BottomOfHeadBlocking
       ^{regularScriptLoad}
-  $of BottomOfBody
 |]
     let bodyScript = [HAMLET|
 ^{body}
 ^{regularScriptLoad}
 |]
+
     return $ PageContent title headAll (case jsLoader master of
       BottomOfBody -> bodyScript
       _ -> body)
diff --git a/yesod-core.cabal b/yesod-core.cabal
--- a/yesod-core.cabal
+++ b/yesod-core.cabal
@@ -1,5 +1,5 @@
 name:            yesod-core
-version:         0.10.2.1
+version:         0.10.2.2
 license:         BSD3
 license-file:    LICENSE
 author:          Michael Snoyman <michael@snoyman.com>
@@ -49,13 +49,13 @@
     build-depends:   time                  >= 1.1.4
                    , yesod-routes          >= 0.0.1    && < 0.1
                    , wai                   >= 1.1      && < 1.2
-                   , wai-extra             >= 1.1      && < 1.2
+                   , wai-extra             >= 1.1      && < 1.3
                    , bytestring            >= 0.9.1.4  && < 0.10
                    , text                  >= 0.7      && < 0.12
                    , template-haskell
                    , path-pieces           >= 0.1      && < 0.2
                    , hamlet                >= 0.10.7   && < 0.11
-                   , shakespeare           >= 0.10     && < 0.11
+                   , shakespeare           >= 0.10     && < 0.12
                    , shakespeare-js        >= 0.11     && < 0.12
                    , shakespeare-css       >= 0.10.5   && < 0.11
                    , shakespeare-i18n      >= 0.0      && < 0.1
