Fixed bug in _token_set