Corrected code for adding first constraint
Minor changes