terminate fix