avoid infinite loop in 'getToken'