Encoding for zero was wrong in hex_encoder.