Bug fix for tear down method