fixed rounding bug