fix buid teardown