fix bugs with hex conversion