isValid fixed