Fix terminateSolving