Fix infinite loop mode.