diff --git a/lib/phpstats/lib/PHPStats/Generator/MersenneRandom.php b/lib/phpstats/lib/PHPStats/Generator/MersenneRandom.php
index <HASH>..<HASH> 100644
--- a/lib/phpstats/lib/PHPStats/Generator/MersenneRandom.php
+++ b/lib/phpstats/lib/PHPStats/Generator/MersenneRandom.php
@@ -29,11 +29,7 @@ class MersenneRandom implements GeneratorInterface
     
     public function __construct($seed = null)
     {
-        if($seed === null) {
-            $this->seed();
-        }
-        
-        $this->seed = $seed;
+        $this->seed($seed);
         $this->index = -1;
         $this->ps = null;
     }
@@ -57,7 +53,7 @@ class MersenneRandom implements GeneratorInterface
     
     public function seed($seed = null)
     {
-        if($seed = null){
+        if($seed === null){
             $seed = mt_rand(0,PHP_INT_MAX);    
         }
Fixed issues in random generator in PHPStats lib.