diff --git a/ChangeLog b/ChangeLog
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,15 @@
+2014-12-31 v5.2.1.2
+	* Merge #377, Fix `browse` erroneously thinking haskell2010 identifiers
+	  are operators
+        * Fix incompatibility with monad-control >= 1.0.0
+        * Fix temporary directories not being removed properly
+        * Merge #405, #408, a race condition in the Emacs frontend
+        * Merge #403, Support unicode quotes in module regexp
+
 2014-11-03 v5.2.1.1
         * Fix `findCabalFiles` thinking `$HOME/.cabal` is a cabal file.
+        * Support `where` clauses, `let` bindings and `case` expressions
+          in case splitting, #400
 
 2014-11-02 v5.2.1.0
         * Fix `newTempDir` on Windows
diff --git a/Language/Haskell/GhcMod/Browse.hs b/Language/Haskell/GhcMod/Browse.hs
--- a/Language/Haskell/GhcMod/Browse.hs
+++ b/Language/Haskell/GhcMod/Browse.hs
@@ -61,13 +61,23 @@
     (mdl,"")    -> (Nothing,mdl)
     (pkg,_:mdl) -> (Just pkg,mdl)
 
+-- Haskell 2010:
+-- small -> ascSmall | uniSmall | _
+-- ascSmall -> a | b | ... | z
+-- uniSmall -> any Unicode lowercase letter
+-- varid -> (small {small | large | digit | ' })
+
+isNotOp :: String -> Bool
+isNotOp (h:_) = isAlpha h || (h == '_')
+isNotOp _ = error "isNotOp"
+
 processExports :: IOish m => ModuleInfo -> GhcModT m [String]
 processExports minfo = do
   opt <- options
   let
     removeOps
       | operators opt = id
-      | otherwise = filter (isAlpha . head . getOccString)
+      | otherwise = filter (isNotOp . getOccString)
   mapM (showExport opt minfo) $ removeOps $ G.modInfoExports minfo
 
 showExport :: IOish m => Options -> ModuleInfo -> Name -> GhcModT m String
@@ -87,10 +97,10 @@
           typeName <- tyResult >>= showThing dflag
           (" :: " ++ typeName) `justIf` detailed opt
       | otherwise = return Nothing
-    formatOp nm@(n:_)
-      | isAlpha n = nm
-      | otherwise = "(" ++ nm ++ ")"
-    formatOp "" = error "formatOp"
+    formatOp nm
+      | null nm    = error "formatOp"
+      | isNotOp nm = nm
+      | otherwise  = "(" ++ nm ++ ")"
     inOtherModule :: IOish m => Name -> GhcModT m (Maybe TyThing)
     inOtherModule nm = G.getModuleInfo (G.nameModule nm) >> G.lookupGlobalName nm
     justIf :: a -> Bool -> Maybe a
diff --git a/Language/Haskell/GhcMod/Monad.hs b/Language/Haskell/GhcMod/Monad.hs
--- a/Language/Haskell/GhcMod/Monad.hs
+++ b/Language/Haskell/GhcMod/Monad.hs
@@ -77,7 +77,10 @@
 
 import Control.Applicative (Alternative)
 import Control.Arrow (first)
-import Control.Monad (MonadPlus, void, liftM)
+import Control.Monad (MonadPlus, void)
+#if !MIN_VERSION_monad_control(1,0,0)
+import Control.Monad (liftM)
+#endif
 import Control.Monad.Base (MonadBase, liftBase)
 
 -- Monad transformer stuff
@@ -270,16 +273,18 @@
            => Options
            -> GhcModT m a
            -> m (Either GhcModError a, GhcModLog)
-runGhcModT opt action = do
-    env <- liftBase $ newGhcModEnv opt =<< getCurrentDirectory
+runGhcModT opt action = gbracket newEnv delEnv $ \env -> do
     r <- first (fst <$>) <$> (runGhcModT' env defaultState $ do
         dflags <- getSessionDynFlags
         defaultCleanupHandler dflags $ do
             initializeFlagsWithCradle opt (gmCradle env)
             action)
-    liftBase $ cleanupGhcModEnv env
     return r
 
+ where
+   newEnv = liftBase $ newGhcModEnv opt =<< getCurrentDirectory
+   delEnv = liftBase . cleanupGhcModEnv
+
 -- | @hoistGhcModT result@. Embed a GhcModT computation's result into a GhcModT
 -- computation. Note that if the computation that returned @result@ modified the
 -- state part of GhcModT this cannot be restored.
@@ -366,7 +371,24 @@
 instance (MonadBaseControl IO m) => MonadBase IO (GhcModT m) where
     liftBase = GhcModT . liftBase
 
+#if MIN_VERSION_monad_control(1,0,0)
+
 instance (MonadBaseControl IO m) => MonadBaseControl IO (GhcModT m) where
+    type StM (GhcModT m) a =
+          StM (StateT GhcModState
+                (ErrorT GhcModError
+                  (JournalT GhcModLog
+                    (ReaderT GhcModEnv m) ) ) ) a
+    liftBaseWith f = GhcModT . liftBaseWith $ \runInBase ->
+        f $ runInBase . unGhcModT
+
+    restoreM = GhcModT . restoreM
+    {-# INLINE liftBaseWith #-}
+    {-# INLINE restoreM #-}
+
+#else
+
+instance (MonadBaseControl IO m) => MonadBaseControl IO (GhcModT m) where
     newtype StM (GhcModT m) a = StGhcMod {
           unStGhcMod :: StM (StateT GhcModState
                               (ErrorT GhcModError
@@ -378,6 +400,8 @@
     restoreM = GhcModT . restoreM . unStGhcMod
     {-# INLINE liftBaseWith #-}
     {-# INLINE restoreM #-}
+
+#endif
 
 -- GHC cannot prove the following instances to be decidable automatically using
 -- the FlexibleContexts extension as they violate the second Paterson Condition,
diff --git a/Language/Haskell/GhcMod/Monad.hs-boot b/Language/Haskell/GhcMod/Monad.hs-boot
deleted file mode 100644
--- a/Language/Haskell/GhcMod/Monad.hs-boot
+++ /dev/null
@@ -1,21 +0,0 @@
-{-# LANGUAGE RoleAnnotations #-}
-
-module Language.Haskell.GhcMod.Monad where
-
-import DynFlags (HasDynFlags)
-import Control.Monad.IO.Class (MonadIO)
-import Control.Applicative (Applicative)
-
-data GhcModT m a
-type role GhcMod nominal
-
-data GhcModEnv
-data GhcModState
-type GhcModWriter = ()
-
-instance Functor GhcMod
-instance Applicative GhcMod
-instance Monad GhcMod
-
-instance HasDynFlags GhcMod
-instance MonadIO GhcMod
diff --git a/Language/Haskell/GhcMod/Utils.hs b/Language/Haskell/GhcMod/Utils.hs
--- a/Language/Haskell/GhcMod/Utils.hs
+++ b/Language/Haskell/GhcMod/Utils.hs
@@ -54,8 +54,7 @@
                 (\_ -> liftIO (setCurrentDirectory dir) >> action)
 
 uniqTempDirName :: FilePath -> FilePath
-uniqTempDirName dir =
-    uncurry (++)
+uniqTempDirName dir = ("ghc-mod"++) $ uncurry (++)
         $ map escapeDriveChar *** map escapePathChar
         $ splitDrive dir
  where
diff --git a/elisp/ghc-doc.el b/elisp/ghc-doc.el
--- a/elisp/ghc-doc.el
+++ b/elisp/ghc-doc.el
@@ -22,8 +22,8 @@
       (setq expr (ghc-read-expression expr0))
       (setq info (ghc-get-info expr0))
       (setq mod (ghc-extact-module-from-info info)))
-    (setq pkg-ver-path (ghc-resolve-document-path mod))
-    (if (and pkg-ver-path mod)
+    (setq pkg-ver-path (and mod (ghc-resolve-document-path mod)))
+    (if pkg-ver-path
 	(ghc-display-document pkg-ver-path mod haskell-org expr)
       (message "No document found"))))
 
@@ -75,7 +75,7 @@
     (apply 'concat (nreverse acc))))
 
 (defun ghc-extact-module-from-info (info)
-  (when (string-match "\`\\([^']+\\)'" info)
+  (when (string-match "[`\u2018]\\([^'\u2019]+\\)['\u2019]" info)
     (match-string 1 info)))
 
 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
diff --git a/elisp/ghc-process.el b/elisp/ghc-process.el
--- a/elisp/ghc-process.el
+++ b/elisp/ghc-process.el
@@ -111,13 +111,12 @@
     (setq ghc-process-results nil)
     (setq ghc-process-num-of-results (or n 1))
     (let ((pro (ghc-with-process cmd 'ghc-process-callback nil hook)))
+      ;; ghc-process-running is now t.
+      ;; But if the process exits abnormally, it is set to nil.
       (condition-case nil
-	  (while (null ghc-process-rendezvous)
-	    ;; 0.01 is too fast for Emacs 24.4.
-	    ;; (sit-for 0.1 t) may get stuck when tooltip is displayed.
-	    (sit-for 0.1)
-	    ;; (discard-input) avoids getting stuck.
-	    (discard-input))
+	  (let ((inhibit-quit nil))
+	    (while (and (null ghc-process-rendezvous) ghc-process-running)
+	      (accept-process-output pro 0.1 nil t)))
 	(quit
 	 (setq ghc-process-running nil))))
     ghc-process-results))
diff --git a/elisp/ghc.el b/elisp/ghc.el
--- a/elisp/ghc.el
+++ b/elisp/ghc.el
@@ -28,7 +28,7 @@
 	       (< emacs-minor-version minor)))
       (error "ghc-mod requires at least Emacs %d.%d" major minor)))
 
-(defconst ghc-version "5.2.1.1")
+(defconst ghc-version "5.2.1.2")
 
 ;; (eval-when-compile
 ;;  (require 'haskell-mode))
diff --git a/ghc-mod.cabal b/ghc-mod.cabal
--- a/ghc-mod.cabal
+++ b/ghc-mod.cabal
@@ -1,5 +1,5 @@
 Name:                   ghc-mod
-Version:                5.2.1.1
+Version:                5.2.1.2
 Author:                 Kazu Yamamoto <kazu@iij.ad.jp>
                         Daniel Gröber <dxld@darkboxed.org>
                         Alejandro Serrano <trupill@gmail.com>
diff --git a/src/GHCMod.hs b/src/GHCMod.hs
--- a/src/GHCMod.hs
+++ b/src/GHCMod.hs
@@ -87,7 +87,7 @@
  \    - help | --help\n\
  \       Print this help message.\n\
  \\n\
- \    - list [FLAGS...]\n\
+ \    - list [FLAGS...] | modules [FLAGS...]\n\
  \        List all visible modules.\n\
  \      Flags:\n\
  \        -d\n\
