fixed problem with teardown