fixed the validator