fixed overflow checking to check for more than 1 bit
fixed scale factor increment bug
moved subtractions before additions to reduce the chance of overflow...not a good fix