Both the Texas House and Senate passed their own bills targeting the state's broken Child Protective Services system Wednesday. It's one of Governor Greg Abbott's emergency items this session, but one amendment in the House outraged some lawmakers and threatened to derail the needed help.

Fireworks flew over a HB 4 amendment filed by State Rep. Mark Keough, (R-The Woodlands). The amendment would prevent undocumented families from being eligible for kinship foster care payments under the bill.

A crowd of lawmakers stood in opposition, calling the amendment offensive and questioning whether it was about immigration issues or helping Texas children.

"I don't think you can find a middle ground for hatred, and I don't think you can find a middle ground for racism," said State Rep. Roland Gutierrez, (D-San Antonio).

Rep. Keough insisted the state has no way to verify that an undocumented caregiver is who they say they are, but after seeing the House divided, he withdrew the amendment.

Minutes later, the bill, intended to keep foster children close to home by providing financial support to their family members willing to foster them, passed unanimously.

HB 5 also lit up with voting board with all green Wednesday. It would make the Department of Family and Protective Services, (DFPS), a stand-alone agency, with the idea of removing red tape that slows CPS and the foster care process.

An amendment that would have created a division within DFPS dedicated to keeping kids aging out of the system from falling into sex trafficking failed. Another amendment to create a division that children could call upon to report abuse also failed.

The bill's author, State Rep. James Frank, (R-Wichita Falls), said more divisions within the agency would mean more slowdown and bureaucracy. He also said that CPS is already tackling those issues.

"We don't need more overhead in Austin. We need more caseworkers on the ground," said Rep. Frank.

Now the Senate's CPS overhaul plan will go to the House, and the House's HB 4 and HB 5 will go to the Senate for votes.