diff --git a/changelog b/changelog
--- a/changelog
+++ b/changelog
@@ -1,3 +1,12 @@
+texmath (0.12.5.1)
+
+  * Compile texmath-server with `-threaded`.
+    This should fix the crashes we have experienced.
+
+  * Add apache style logging to web server.
+
+  * Add more strictness in Unicode.ToTeX.
+
 texmath (0.12.5)
 
   * TeX reader: Improve treatment of `\operatorname` (#147).
diff --git a/server/Main.hs b/server/Main.hs
--- a/server/Main.hs
+++ b/server/Main.hs
@@ -7,6 +7,7 @@
 module Main where
 
 import Network.Wai.Handler.Warp
+import Network.Wai.Logger (withStdoutLogger)
 import Data.Aeson
 import Data.Aeson.TH
 import Data.Maybe (fromMaybe)
@@ -42,9 +43,9 @@
        <> header "texmath-server - an HTTP server for texmath" )
   opts <- execParser options
   putStrLn $ "Starting server on port " <> show (port opts)
-  let settings = setPort (port opts) defaultSettings
-  runSettings settings app
-
+  withStdoutLogger $ \logger -> do
+    let settings = setPort (port opts) $ setLogger logger defaultSettings
+    runSettings settings app
 -- This is the API.  The "/convert" endpoint takes a request body
 -- consisting of a JSON-encoded Params structure and responds to
 -- Get requests with either plain text or JSON, depending on the
diff --git a/src/Text/TeXMath/Unicode/ToTeX.hs b/src/Text/TeXMath/Unicode/ToTeX.hs
--- a/src/Text/TeXMath/Unicode/ToTeX.hs
+++ b/src/Text/TeXMath/Unicode/ToTeX.hs
@@ -1,4 +1,5 @@
 {-# LANGUAGE ViewPatterns #-}
+{-# LANGUAGE BangPatterns #-}
 {-# LANGUAGE OverloadedStrings #-}
 {-
 Copyright (C) 2014 Matthew Pickering <matthewtpickering@gmail.com>
@@ -115,9 +116,11 @@
 symbolMap = foldr go mempty records
  where
    go r m =
-     foldr (\(_,c) ->
+     foldr (\(_,!c) ->
               if T.take 1 c == "\\" && not (T.any (=='{') c)
-              then M.insert c (ESymbol (category r) (T.singleton (uchar r)))
+              then
+                let !t = T.singleton $! uchar $! r
+                 in M.insert c (ESymbol (category r) t)
               else id)
            m
            (commands r)
diff --git a/texmath.cabal b/texmath.cabal
--- a/texmath.cabal
+++ b/texmath.cabal
@@ -1,5 +1,5 @@
 Name:                texmath
-Version:             0.12.5
+Version:             0.12.5.1
 Cabal-Version:       >= 1.10
 Build-type:          Simple
 Synopsis:            Conversion between math formats.
@@ -138,9 +138,9 @@
     Main-is:             Main.hs
     Hs-Source-Dirs:      server
     if impl(ghc >= 6.12)
-      Ghc-Options:     -Wall -fno-warn-unused-do-bind
+      Ghc-Options:     -Wall -threaded -fno-warn-unused-do-bind
     else
-      Ghc-Options:     -Wall
+      Ghc-Options:     -Wall -threaded
     Ghc-Prof-Options:  -fprof-auto-exported
     if flag(server)
       Buildable:         True
@@ -151,6 +151,7 @@
                        , xml
                        , servant-server
                        , wai
+                       , wai-logger
                        , warp
                        , optparse-applicative
                        , safe
