diff --git a/Math/Combinat/Sets.hs b/Math/Combinat/Sets.hs
--- a/Math/Combinat/Sets.hs
+++ b/Math/Combinat/Sets.hs
@@ -42,12 +42,16 @@
 -- TODO: better name?
 tuplesFromList :: Int -> [a] -> [[a]]
 tuplesFromList 0 _  = [[]]
-tuplesFromList k xs = [ (y:ys) | y <- xs, ys <- tuplesFromList (k-1) xs ]
+tuplesFromList k xs = [ (y:ys) | ys <- tuplesFromList (k-1) xs , y <- xs ]
+--the order seems to be very important, the wrong order causes a memory leak!
+--tuplesFromList k xs = [ (y:ys) | y <- xs, ys <- tuplesFromList (k-1) xs ]
  
 -- | \"Tensor product\" for lists.
 listTensor :: [[a]] -> [[a]]
 listTensor [] = [[]]
-listTensor (xs:xss) = [ y:ys | y <- xs, ys <- listTensor xss ]
+listTensor (xs:xss) = [ y:ys | ys <- listTensor xss , y <- xs ]
+--the order seems to be very important, the wrong order causes a memory leak!
+--listTensor (xs:xss) = [ y:ys | y <- xs, ys <- listTensor xss ]
 
 --------------------------------------------------------------------------------
 
@@ -62,7 +66,9 @@
 -- | All sublists of a list.
 sublists :: [a] -> [[a]]
 sublists [] = [[]]
-sublists (x:xs) = map (x:) (sublists xs) ++ sublists xs 
+sublists (x:xs) = sublists xs ++ map (x:) (sublists xs)  
+--the order seems to be very important, the wrong order causes a memory leak!
+--sublists (x:xs) = map (x:) (sublists xs) ++ sublists xs 
 
 -- | @# = 2^n@.
 countSublists :: Int -> Integer
diff --git a/combinat.cabal b/combinat.cabal
--- a/combinat.cabal
+++ b/combinat.cabal
@@ -1,5 +1,5 @@
 Name:                combinat
-Version:             0.2.3
+Version:             0.2.3.1
 Synopsis:            Generation of various combinatorial objects.
 Description:         A collection of functions to generate combinatorial
                      objects like partitions, combinations, permutations,
