Fix parsing of hex numbers