Validations and fixes.