resolved the issues with token comparisons