fix conversions from Double/BigDecimal to Number