Fix problem with facorization of primes 2 and 3.