fixing types in prime problem