fix issue with wrong number of primes output when min specified