prevent encoding issues

Hex to byte was interpreting utf8 which led to double bytes