listPrimes issue with closed results sets fix