Undo bug with empty repeats