Fix teardown issue