Fix a bug

Bug: after adding a line and then reset,  the validation will fail and
complain that the second line (already removed) doesn't have the correct
format.