Fixed crashes in Solver, Constraints.