fixing serialization bug of Decimal and Date fields