i124580 corrected some conversions of scale values to integer positions