Changed max primes to 20000 from 2000.