Fix an issue in token_and_options with malformed headers