fixed an issue with the validation of a token