Fix test teardown