diff --git a/neet.cabal b/neet.cabal
--- a/neet.cabal
+++ b/neet.cabal
@@ -2,7 +2,7 @@
 -- see http://haskell.org/cabal/users-guide/
 
 name:                neet
-version:             0.2.0.0
+version:             0.2.0.1
 synopsis:            A NEAT library for Haskell
 -- description:         
 homepage:            https://github.com/raymoo/NEET
diff --git a/src/Neet/Examples/XOR.hs b/src/Neet/Examples/XOR.hs
--- a/src/Neet/Examples/XOR.hs
+++ b/src/Neet/Examples/XOR.hs
@@ -88,7 +88,8 @@
   _ <- getLine
   putStrLn "Running XOR experiment with 150 population and default parameters"
   seed <- randomIO
-  let pop = newPop seed (PS 150 2 1 defParams (Just 2))
+  let pop = newPop seed (PS 150 2 1 defParams { distParams = dp } Nothing)
+      dp = defDistParams { delta_t = 5 }
   (pop', sol) <- xorLoop pop
   printInfo pop'
   putStrLn $ "Solution found in generation " ++ show (popGen pop')
diff --git a/src/Neet/Genome.hs b/src/Neet/Genome.hs
--- a/src/Neet/Genome.hs
+++ b/src/Neet/Genome.hs
@@ -421,7 +421,11 @@
         
         weightDiffs = differences conns1 conns2
 
-        weightFactor = IM.foldl (+) 0 weightDiffs / fromIntegral (IM.size weightDiffs)
+        weightsSize = IM.size weightDiffs
+
+        weightFactor
+          | weightsSize > 0 = IM.foldl (+) 0 weightDiffs / fromIntegral weightsSize
+          | otherwise = 0
 
         ids1 = IM.keysSet conns1
 
