Fix isValid.