Fix bug in validator.