fixed the bugs in PartialConstraints.