Use BigDecimal.min instead of Math.min