fix bad hex conversion