removed the condition count < 3 in UpdateConstraints.