-Fixed bug where execution would continue loop in query with 1 constraint.