diff --git a/Text/Hamlet.hs b/Text/Hamlet.hs
--- a/Text/Hamlet.hs
+++ b/Text/Hamlet.hs
@@ -564,8 +564,11 @@
     go' = mconcat . map (runtimeContentToHtml cd render i18nRender handleMsg)
     handleMsg d = case lookup d cd of
             Just (EMsg s) -> i18nRender s
-            _ -> error $ show d ++ ": expected EMsg for ContentMsg"
+            _ -> nothingError "EMsg for ContentMsg" d
 
+nothingError :: Show a => String -> a -> b
+nothingError expected d = error $ "expected " ++ expected ++ " but got Nothing for: " ++ show d
+
 runtimeContentToHtml :: RuntimeVars msg url -> Render url -> Translate msg -> (Deref -> Html) -> Content -> Html
 runtimeContentToHtml cd render i18nRender handleMsg = go
   where
@@ -584,7 +587,7 @@
         case lookup d cd of
             Just (EUrl u) -> toHtml $ render u []
             Just wrong -> error $  "expected EUrl but got: " ++ show wrong ++ "\nfor: " ++ show d
-            _ -> error $ "expected EUrl but got Nothing for: " ++ show d
+            _ -> nothingError "EUrl" d
     go (ContentUrl True d) =
         case lookup d cd of
             Just (EUrlParam (u, p)) ->
diff --git a/Text/Shakespeare.hs b/Text/Shakespeare.hs
--- a/Text/Shakespeare.hs
+++ b/Text/Shakespeare.hs
@@ -460,6 +460,9 @@
 
 
 
+nothingError :: Show a => String -> a -> b
+nothingError expected d = error $ "expected " ++ expected ++ " but got Nothing for: " ++ show d
+
 shakespeareRuntime :: ShakespeareSettings -> FilePath -> [(Deref, VarExp url)] -> Shakespeare url
 shakespeareRuntime settings fp cd render' = unsafePerformIO $ do
     mtime <- qRunIO $ getModified $ decodeString fp
@@ -482,17 +485,17 @@
     go (ContentVar d) =
         case lookup d cd of
             Just (EPlain s) -> s
-            _ -> error $ show d ++ ": expected EPlain"
+            _ -> nothingError "EPlain" d
     go (ContentUrl d) =
         case lookup d cd of
             Just (EUrl u) -> fromText $ render' u []
-            _ -> error $ show d ++ ": expected EUrl"
+            _ -> nothingError "EUrl" d
     go (ContentUrlParam d) =
         case lookup d cd of
             Just (EUrlParam (u, p)) ->
                 fromText $ render' u p
-            _ -> error $ show d ++ ": expected EUrlParam"
+            _ -> nothingError "EUrlParam" d
     go (ContentMix d) =
         case lookup d cd of
             Just (EMixin m) -> m render'
-            _ -> error $ show d ++ ": expected EMixin"
+            _ -> nothingError "EMixin" d
diff --git a/Text/Shakespeare/Text.hs b/Text/Shakespeare/Text.hs
--- a/Text/Shakespeare/Text.hs
+++ b/Text/Shakespeare/Text.hs
@@ -24,6 +24,7 @@
 import Language.Haskell.TH.Quote (QuasiQuoter (..))
 import Language.Haskell.TH.Syntax
 import Data.Text.Lazy.Builder (Builder, fromText, toLazyText, fromLazyText)
+import Data.Text.Lazy.Builder.Int (decimal)
 import qualified Data.Text as TS
 import qualified Data.Text.Lazy as TL
 import Text.Shakespeare
@@ -41,9 +42,9 @@
 instance ToText TS.Text where toText = fromText
 instance ToText TL.Text where toText = fromLazyText
 
-instance ToText Int32 where toText = toText . show
-instance ToText Int64 where toText = toText . show
-instance ToText Int   where toText = toText . show
+instance ToText Int32 where toText = decimal
+instance ToText Int64 where toText = decimal
+instance ToText Int   where toText = decimal
 
 settings :: Q ShakespeareSettings
 settings = do
diff --git a/shakespeare.cabal b/shakespeare.cabal
--- a/shakespeare.cabal
+++ b/shakespeare.cabal
@@ -1,5 +1,5 @@
 name:            shakespeare
-version:         2.0.1.1
+version:         2.0.1.2
 license:         MIT
 license-file:    LICENSE
 author:          Michael Snoyman <michael@snoyman.com>
@@ -150,7 +150,7 @@
                  , system-fileio    >= 0.3
                  , containers
                  , parsec           >= 2       && < 4
-                 , hspec            >= 1.3
+                 , hspec            == 2.*
                  , text             >= 0.7
                  , process
                  , template-haskell
diff --git a/test/Text/Shakespeare/HamletSpec.hs b/test/Text/Shakespeare/HamletSpec.hs
--- a/test/Text/Shakespeare/HamletSpec.hs
+++ b/test/Text/Shakespeare/HamletSpec.hs
@@ -5,7 +5,7 @@
 import HamletTestTypes (ARecord(..))
 
 import Test.HUnit hiding (Test)
-import Test.Hspec
+import Test.Hspec hiding (Arg)
 
 import Prelude hiding (reverse)
 import Text.Hamlet
