more token handling changes