better ex handling during teardown