fix teardown issue