Fix more termination problems