Fixed bug in aggregated constraint