Bug fix for prime.rb (make test failed)