fix incompatibility between float and Decimal