Fixed minor error in isPrime