fixed the validation issues