As Democrats and the mainstream media continue to whip up the firestorm over President Donald Trump’s zero-tolerance enforcement of immigration law, specifically family separation at the border, Sen. Ted Cruz (R-TX) on Monday proposed legislation to quickly mitigate the immediate problem.

Cruz’s bill would end the practice of separating families by authorizing new temporary shelters to house families together until their asylum requests are processed. He also proposes that the number of federal immigration judges be doubled to a total of 750 and that an expedited review and processing of asylum cases within 14 days be implemented. Those families who do not meet the asylum requirements would be immediately returned to their home countries.

Cruz’s proposal does offer at least a temporary solution to a problem that has been years in the making. It would essentially end the bad optics of separated families, while not returning to the flawed policy of Barack Obama’s “catch and release.” It offers Trump and Republicans a bill that doesn’t compromise the commitment to fighting against illegal immigration and securing the U.S. border, while avoiding the biggest objection for Democrats — funding the border wall.

Since the implementation of Trump’s zero-tolerance policy in April, almost 2,000 children have been separated from their parents at the border. However, the vast majority of children currently housed in Health and Human Services detention centers — 10,000 of them — are children who illegally crossed the border without their parents. At least some of these children were teens who came here to abort their children. That’s a family separation policy that Democrats don’t care about.

When Attorney General Jeff Sessions announced the zero-tolerance policy, he noted that it was both a return to enforcing our nation’s laws and would serve as a deterrent to others who may consider crossing the border illegally. Ultimately, who is to blame for children being separated from their parents? It is parents who choose to cross the border illegally. In some cases, it’s not parents, but other adults exploiting children for entry. The outrage over Trump’s policy to enforce the law is entirely misplaced. And enforcing the law does appear to be working to deter some from illegally crossing, as CBS News laments that fear has spread along the Mexican border over family separations.

So while Cruz’s legislative fix might mitigate the immediate ugly optics of enforcing the law, an interesting side effect is that in the long run it may also remove a disincentive for illegal immigration.