Fixed a bug about limit conditions when compare a prime candidate against some prime factors