fixed the validation