fixed bad str=>int conversions