fixed a bug where prime_factors(1) returned None