diff --git a/CHANGELOG.md b/CHANGELOG.md
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -52,3 +52,8 @@
 * Fifth version revised A. Fixed two issues that led to incorrect behaviour of readU2 and readU3
   functions and also fixed issue with splitL0 function.
 
+## 0.5.2.0 -- 2023-12-01
+
+* Fifth version revised B. Fixed issue with Phladiprelio.General.Distance.distanceSqrG2 function
+  that led earlier to incorrect results.
+
diff --git a/Phladiprelio/General/Distance.hs b/Phladiprelio/General/Distance.hs
--- a/Phladiprelio/General/Distance.hs
+++ b/Phladiprelio/General/Distance.hs
@@ -75,6 +75,6 @@
          rs = map (/ my) ys
          lr = length rs
          dc = lc `quot` lr
-         qs = concatMap (replicate dc) ys
+         qs = concatMap (replicate dc) rs
 {-# INLINE distanceSqrG2 #-}
 
diff --git a/phladiprelio-general-datatype.cabal b/phladiprelio-general-datatype.cabal
--- a/phladiprelio-general-datatype.cabal
+++ b/phladiprelio-general-datatype.cabal
@@ -1,6 +1,6 @@
 cabal-version:      1.24
 name:               phladiprelio-general-datatype
-version:            0.5.1.0
+version:            0.5.2.0
 synopsis:           Extended functionality of PhLADiPreLiO
 description:        Can be used not only for language, but also for simpler music and lyrics composing.
 homepage:           https://hackage.haskell.org/package/phladiprelio-general-datatype
