Improved token retry handling (to make it work)