diff --git a/Changelog.md b/Changelog.md
--- a/Changelog.md
+++ b/Changelog.md
@@ -1,3 +1,8 @@
+### 0.4.4.0
+
+- Using *WorkerProcessIsExiting* instead of *ThreadKilled* as required in
+  *ngx-export 1.6.4*.
+
 ### 0.4.3.0
 
 - Function *exitWorkerProcess* was renamed to *restartWorkerProcess*.
diff --git a/NgxExport/Tools.hs b/NgxExport/Tools.hs
--- a/NgxExport/Tools.hs
+++ b/NgxExport/Tools.hs
@@ -1,5 +1,5 @@
 {-# LANGUAGE TemplateHaskell, TypeFamilies, EmptyDataDecls #-}
-{-# LANGUAGE DeriveGeneric, DeriveLift, LambdaCase, NumDecimals #-}
+{-# LANGUAGE DeriveGeneric, DeriveLift, NumDecimals #-}
 
 -----------------------------------------------------------------------------
 -- |
@@ -436,12 +436,12 @@
 -- service because data is not altered during runtime. A single-shot service
 -- runs exactly two times during the lifetime of a worker process: the first
 -- run (when the second argument of the service, i.e. the /first-run/ flag, is
--- /True/) is immediately followed by the second run (when the the /first-run/
--- flag is /False/). On the second run the service handler is used as an
--- exception handler when the service is shutting down after the 'ThreadKilled'
--- exception thrown. Accordingly, a single-shot handler can be used for
--- allocation of some global resources (when the first-run flag is /True/), and
--- cleaning them up (when the first-run flag is /False/).
+-- /True/) is immediately followed by the second run (when the /first-run/ flag
+-- is /False/). On the second run the service handler is used as an exception
+-- handler when the service is shutting down after the 'WorkerProcessIsExiting'
+-- exception has been thrown. Accordingly, a single-shot handler can be used
+-- for allocation of some global resources (when the first-run flag is /True/),
+-- and cleaning them up (when the first-run flag is /False/).
 --
 -- Notice that service /testReadConfWithDelay/ manages time delays on its own,
 -- therefore it uses /no-sleeps/ strategy @'PersistentService' Nothing@.
@@ -578,10 +578,8 @@
                    SingleShotService ->
                        ([|\conf_data__ -> unless $(eFstRun) $
                               handle
-                                  (\case
-                                       ThreadKilled -> void $
-                                           $(eF) conf_data__ False
-                                       _ -> return ()
+                                  ((\_ -> void $ $(eF) conf_data__ False) ::
+                                      WorkerProcessIsExiting -> IO ()
                                   ) $ forever $ threadDelaySec $ toSec $ Hr 24
                         |]
                        ,[|\conf_data__ ->
diff --git a/ngx-export-tools.cabal b/ngx-export-tools.cabal
--- a/ngx-export-tools.cabal
+++ b/ngx-export-tools.cabal
@@ -1,5 +1,5 @@
 name:                       ngx-export-tools
-version:                    0.4.3.0
+version:                    0.4.4.0
 synopsis:                   Extra tools for Nginx haskell module
 description:                Extra tools for
         <http://github.com/lyokha/nginx-haskell-module Nginx haskell module>.
@@ -20,7 +20,7 @@
                           , template-haskell >= 2.11.0.0
                           , bytestring >= 0.10.0.0
                           , binary >= 0.4
-                          , ngx-export >= 1.6.3
+                          , ngx-export >= 1.6.4
                           , aeson >= 1.0
                           , safe
 
