fix rounding/scaling issue