fixed isInvalid