Fixed bug in new constraint