fixed minor issues with token_error reporting