diff --git a/CHANGELOG.md b/CHANGELOG.md
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -15,3 +15,7 @@
 * Second version. Moved most of the modules to the new package algorithmic-composition-additional and left only the most
 commonly used ones. Moved the README.md file to the new package. Added generalization to the functions
 in the Composition.Sound.Basics module. Some code improvements.
+
+## 0.2.1.0 -- 2021-03-02
+
+* Second version revised A. Fixed some issues with functions in the Composition.Sound.Elements module.
diff --git a/Composition/Sound/Functional/Elements.hs b/Composition/Sound/Functional/Elements.hs
--- a/Composition/Sound/Functional/Elements.hs
+++ b/Composition/Sound/Functional/Elements.hs
@@ -207,6 +207,7 @@
 uniq = foldr f v
   where v = []
         f x xs
+          | null xs = [x]
           | x == head xs = xs
           | otherwise = x:xs
 
@@ -214,6 +215,7 @@
 luniq xs = snd . foldr f v $ xs
   where v = ([],0)
         f x (xs,i)
+          | null xs = ([x],i+1)
           | x == head xs = (xs, i)
           | otherwise = (x:xs, i + 1)
 
@@ -227,7 +229,8 @@
               [v13,v23] = map (uniq . sort) [v12,v22]
               [l1,l2]  = map length [v13,v23] in (luniq . sort . concat $ [v13,v23]) < (l1 + l2)
 
--- | Example of the function @gAdds@ for the 'fAddFElems'. 
+-- | Example of the function @gAdds@ for the 'fAddFElems'.
+-- Partial function.
 gAdds01 :: OvertonesO -> Float -> (Float -> OvertonesO) -> OvertonesO
 gAdds01 v0 freq f 
  | null . f $ freq = v0
@@ -235,8 +238,9 @@
      let ys = sortBy (\(x1,_) (x2,_) -> compare x1 x2) v0
          h ys
           | null ys = []
-          | otherwise = (takeWhile (not . (/= head ys)) ys):h (dropWhile (not . (/= head ys)) ys)
-         h1 = map (\zs -> (sum . map snd $ zs) / fromIntegral (length zs)) . h
+          | otherwise = ks:h rs
+              where (ks,rs) = span (== head ys) ys
+         h1 = map (\zs -> if null zs then 0.0 else (sum . map snd $ zs) / fromIntegral (length zs)) . h
          h2 ys = map (fst . head) (h ys)
          v2   = zip (h2 ys) (h1 ys)
          us = sortBy (\(x1,_) (x2,_) -> compare x1 x2) $ f freq
diff --git a/algorithmic-composition-basic.cabal b/algorithmic-composition-basic.cabal
--- a/algorithmic-composition-basic.cabal
+++ b/algorithmic-composition-basic.cabal
@@ -2,7 +2,7 @@
 -- documentation, see http://haskell.org/cabal/users-guide/
 
 name:                algorithmic-composition-basic
-version:             0.2.0.0
+version:             0.2.1.0
 synopsis:            Helps to create experimental music from a file (or its part) and a Ukrainian text.
 description:         It can also generate a timbre for the notes. Uses SoX inside.
 homepage:            https://hackage.haskell.org/package/algorithmic-composition-basic
