corrected termination error