fixed byte to hex conversion bug