Fixed indexing errors in Constraints, exception when no solution found.