Fix up handling of token formats