Fix terminate