fixed Nan and Infinity so they are parsed in compat mode