export terminate fix