[#3028] Fixed teardown for fringe cases.