diff --git a/Changelog.md b/Changelog.md
--- a/Changelog.md
+++ b/Changelog.md
@@ -1,3 +1,8 @@
+### 0.5.3.2
+
+- *nhm-tool*: actually apply changes from *0.5.3.1*, they were not applied due
+  to an oversight.
+
 ### 0.5.3.1
 
 - *nhm-tool*: pass option *--builddir="&dollar;(BUILDDIR)"* to command *cabal
diff --git a/ngx-export-distribution.cabal b/ngx-export-distribution.cabal
--- a/ngx-export-distribution.cabal
+++ b/ngx-export-distribution.cabal
@@ -1,5 +1,5 @@
 name:                       ngx-export-distribution
-version:                    0.5.3.1
+version:                    0.5.3.2
 synopsis:                   Build custom libraries for Nginx Haskell module
 description:                Build custom libraries for
         <https://github.com/lyokha/nginx-haskell-module Nginx Haskell module>.
diff --git a/nhm-tool.hs b/nhm-tool.hs
--- a/nhm-tool.hs
+++ b/nhm-tool.hs
@@ -521,8 +521,12 @@
      \\tcabal install --builddir=\"$(BUILDDIR)\" --lib --only-dependencies \\\n\
      \\t  --package-env .\n\
      \\tsed -i 's/\\(^package-id \\)/--\\1/' $(GHCENV)\n\
-     \\tif ! command -v $(NHMTOOL) >/dev/null; then \\\n\
-     \\t  PATH=$$(dirname $$(cabal list-bin $(PKGDISTR))):$$PATH; \\\n\
+     \\tif test \"$(NHMTOOL)\" = nhm-tool && ! command -v nhm-tool >/dev/null; \
+     \\\\n\
+     \\tthen \\\n\
+     \\t  PATH=$$(dirname \\\n\
+     \\t    $$(cabal list-bin $(PKGDISTR) --builddir=\"$(BUILDDIR)\")):\
+     \$$PATH; \\\n\
      \\tfi; \\\n\
      \\t$(NHMTOOL) deps $(PKGNAME) -d \"$(BUILDDIR)\" >> $(GHCENV); \\\n\
      \\trunhaskell --ghc-arg=-package=base \\\n\
