fix test teardown issue