diff --git a/Shelly.hs b/Shelly.hs
--- a/Shelly.hs
+++ b/Shelly.hs
@@ -812,7 +812,7 @@
                  ExitSuccess -> 0
                  ExitFailure n -> n
 
-    put $ state { sStderr = errs , sCode = code }
+    modify $ \state' -> state' { sStderr = errs , sCode = code }
 
     liftIO $ case (sErrExit state, ex) of
       (True,  ExitFailure n) -> throwIO $ RunFailed exe args n errs
diff --git a/shelly.cabal b/shelly.cabal
--- a/shelly.cabal
+++ b/shelly.cabal
@@ -1,6 +1,6 @@
 Name:       shelly
 
-Version:     0.14.2.1
+Version:     0.14.2.2
 Synopsis:    shell-like (systems) programming in Haskell
 
 Description: Shelly provides convenient systems programming in Haskell,
