added ensureTeardown flag