fix checkConstraints