Undo bug (wrong index)