bug fix for token renewal