Fixing bug with encoding/decoding varint and BigDecimal