client teardown fix