diff --git a/CHANGELOG.md b/CHANGELOG.md
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -62,4 +62,8 @@
 
 # 1.3.3.0 -- 2022-08-30
 
-* Bug correction in pairs.
+* Bug correction in pairs.
+
+# 1.3.4.0 -- 2022-08-30
+
+* Bug correction in maybeSecond.
diff --git a/WeakSets.cabal b/WeakSets.cabal
--- a/WeakSets.cabal
+++ b/WeakSets.cabal
@@ -14,7 +14,7 @@
 -- PVP summary:      +-+------- breaking API changes
 --                   | | +----- non-breaking API additions
 --                   | | | +--- code changes with no API change
-version:            1.3.3.0
+version:             1.4.0.0
 
 -- A short (one-line) description of the package.
 synopsis:
diff --git a/src/Math/PureSet.hs b/src/Math/PureSet.hs
--- a/src/Math/PureSet.hs
+++ b/src/Math/PureSet.hs
@@ -111,7 +111,7 @@
     maybeSecond :: PureSet -> Maybe PureSet
     maybeSecond i@(PureSet s)
         | length l == 1 = if card (anElement s) == 1 then Just (anElement.pureSetToSet.anElement $ s) else Nothing
-        | length l == 2 = if r2 !! 0 == first i then Just (r2 !! 1) else (if r2 !! 1 == first i then Just (r2 !! 0) else Nothing)
+        | length l == 2 = if length r2 /= 2 then Nothing else (if r2 !! 0 == first i then Just (r2 !! 1) else (if r2 !! 1 == first i then Just (r2 !! 0) else Nothing))
         | otherwise = Nothing
         where
             l = setToList s
@@ -179,6 +179,6 @@
                                     in 
                                         if (not anyMissing) && (set (Just <$> [0..maxNb])) == (set numbers) then Just (maxNb + 1) else Nothing
                 toPair x
-                    | null (maybeSecond x) = Nothing
+                    | null (maybeSecond x) || null (maybeFirst x) = Nothing
                     | otherwise = Just $ "(" ++ (formatPureSet.first $ x) ++ "," ++ (formatPureSet.second $ x) ++ ")"   
     
