Fix demos to work with loop mode