fixed issue with token not being cached