fix a bug in HexUtil