fixed the validation errors