Fixed parsing of hex character codes