Fix infinite loop on expired token