added checks for primal/dual infeasibility