Small fixes to the validation