Fix errors of validation

Feel free to discard some of my commits.