sqrt prime check error fix