Updated hex conversion