diff --git a/Changelog.md b/Changelog.md
--- a/Changelog.md
+++ b/Changelog.md
@@ -1,3 +1,11 @@
+### 1.2.11
+
+- Module *NgxExport.Tools.Resolve*.
+  + A smarter implementation of the internal hashable data *HashUQuery*.
+- Module *NgxExport.Tools.PCRE*.
+  + Replace *rareService* mode declaration in service *declareRegexes* by
+    *restartPromptly* declaration from *ngx-export-tools &ge; 1.2.6*.
+
 ### 1.2.10
 
 - Module *NgxExport.Tools.Resolve*.
diff --git a/NgxExport/Tools/PCRE.hs b/NgxExport/Tools/PCRE.hs
--- a/NgxExport/Tools/PCRE.hs
+++ b/NgxExport/Tools/PCRE.hs
@@ -163,7 +163,7 @@
 declareRegexes :: InputRegexes -> NgxExportService
 declareRegexes = voidService
 
-ngxExportSimpleServiceTyped 'declareRegexes ''InputRegexes rareService
+ngxExportSimpleServiceTyped 'declareRegexes ''InputRegexes restartPromptly
 
 compileRegexes :: ByteString -> IO L.ByteString
 compileRegexes = voidHandler' $ do
diff --git a/NgxExport/Tools/Resolve.hs b/NgxExport/Tools/Resolve.hs
--- a/NgxExport/Tools/Resolve.hs
+++ b/NgxExport/Tools/Resolve.hs
@@ -43,6 +43,7 @@
 import           NgxExport.Tools.SimpleService
 import           NgxExport.Tools.TimeInterval
 
+import           Language.Haskell.TH hiding (Name)
 import           Network.DNS
 import           Network.HTTP.Client
 import           Network.HTTP.Client.TLS (newTlsManager)
@@ -330,18 +331,6 @@
 -- | Priority policy of upstream names.
 type UNamePriorityPolicy = PriorityPolicy UName
 
--- FIXME: an awkward hack to avoid using orphan instance Hashable Name,
--- make sure that HashUQuery and UQuery have the same internal representation!
-data UQueryGen a = UQueryAGen (WeightedList a) UNamePriorityPolicy
-                 | UQerySRVGen a UNamePriorityPolicy
-                 deriving (Read, Eq, Generic)
-                 deriving anyclass Hashable
-
-type HashUQuery = UQueryGen ByteString
-
-hashUQuery :: UQuery -> HashUQuery
-hashUQuery = unsafeCoerce
-
 -- | Upstream configuration.
 --
 -- Includes DNS query model and parameters for Nginx /server/ description.
@@ -381,6 +370,39 @@
 -- | Collected server data.
 type CollectedServerData = Map UName [ServerData]
 
+-- FIXME: an awkward hack to avoid using orphan instance Hashable Name,
+-- the Template Haskell splice below produces the following definitions:
+--   1. data HashUQuery deriving Hashable which is essentially data UQuery
+--      with all Name entries replaced with ByteString,
+--   2. hashUQuery :: UQuery -> HashUQuery which is mere unsafeCoerce
+do
+    TyConI (DataD [] name [] Nothing cs _) <- reify ''UQuery
+    let name' = nameBase name
+        (hashU, hashL) = ("Hash", "hash")
+        nameHashT = mkName $ hashU ++ name'
+        nameHashF = mkName $ hashL ++ name'
+    sequence
+        [dataD (return []) nameHashT [] Nothing
+            (map (\case
+                      NormalC n ts ->
+                          normalC (mkName $ hashU ++ nameBase n) $
+                              map (\(b, t) -> bangType (return b) $
+                                      case t of
+                                          ConT c
+                                              | c == ''Name -> [t|ByteString|]
+                                              | c == ''NameList ->
+                                                  [t|WeightedList ByteString|]
+                                          _ -> return t
+                                  ) ts
+                      _ -> undefined
+                 ) cs
+            ) [derivClause Nothing [[t|Eq|], [t|Generic|]]
+              ,derivClause (Just AnyclassStrategy) [[t|Hashable|]]
+              ]
+        ,sigD nameHashF [t|$(conT name) -> $(conT nameHashT)|]
+        ,funD nameHashF [clause [] (normalB [|unsafeCoerce|]) []]
+        ]
+
 collectedServerData ::
     IORef (TimeInterval, HashMap HashUQuery CollectedServerData)
 collectedServerData = unsafePerformIO $ newIORef (Unset, HM.empty)
@@ -557,11 +579,10 @@
     -- causes the latter restarts later, and vice versa, an unhealthy instance
     -- may write a short TTL which causes a healthy instance restarts sooner
     if new `HM.isSubmapOf` old
-        then do
+        then voidHandler $
             when (nwt /= wt) $
                 atomicModifyIORef' collectedServerData $
                     (, ()) . first (const nwt)
-            return ""
         else do
             atomicModifyIORef' collectedServerData $
                 (, ()) . (const nwt *** (new `HM.union`))
diff --git a/ngx-export-tools-extra.cabal b/ngx-export-tools-extra.cabal
--- a/ngx-export-tools-extra.cabal
+++ b/ngx-export-tools-extra.cabal
@@ -1,5 +1,5 @@
 name:                       ngx-export-tools-extra
-version:                    1.2.10
+version:                    1.2.11
 synopsis:                   More extra tools for Nginx Haskell module
 description:                More extra tools for
         <https://github.com/lyokha/nginx-haskell-module Nginx Haskell module>.
@@ -40,7 +40,7 @@
                           , bytestring >= 0.10.0.0
                           , base64 >= 0.3.0.0
                           , ngx-export
-                          , ngx-export-tools >= 1.2.5
+                          , ngx-export-tools >= 1.2.6
                           , http-types >= 0.7.0
                           , http-client >= 0.5.3
                           , http-client-tls >= 0.3.4
