Improve performance of string-to-integer mapping.
Fix issue with invalid token reads.