fix ConstraintFactory class case bug