Fix more termination problems.