Fix teardown warnings