fixed bug in isValid() method of test suite