Corrected rounding error while scaling.