Fix "repeat" handling