The House of Representatives voted overwhelmingly to pass a bill to limit the National Security Agency’s mass metadata collecting in the wake of the Edward Snowden leaks. However, the bill was gutted before it finally reached a vote and security advocates and other politicians slammed the legislation.

The USA Freedom Act was passed 303-121 in a rare example of bipartisanship. According to The New York Times, the legislation targets the abilities of the Foreign Intelligence Surveillance Court (FISC), which could previously issue orders to have business data from anyone deemed a national security threat collected by agencies. However, the new bill will require the government to establish at least two links to a suspect before obtaining their records.

The bill also requires the government to go through telecommunications firms when requesting information.

Rep. Jim Sensenbrenner (R-Wis.) noted that the bill is clearly not perfect, reports CBS News. However, he said that should not stop any member of congress from voting against it.

“Let me be clear, I wish this bill did more,” Sensenbrenner said. “To my colleagues who lament changes, I agree with you. To privacy groups who are upset about lost provisions, I share your disappointment... But this bill still deserves support. Don't let the perfect be the enemy of the good.”

The bill ended up being watered down by the Obama Administration after the House Judiciary and Intelligence Committees drafted it. That caused many privacy and security advocates to voice their distaste for the legislation.

The biggest change was the widening of the definition of what or who the NSA can monitor. CBS News notes that it originally said that the government needed to give telecommunications companies search terms “used to uniquely describe a person, entity, or account” in order to gain access to the metadata. The bill as passed hat the phrase “such as” added. Now, NSA search terms need to be “a discrete term, such as a term specifically identifying a person, entity, account, address, or device.”

“This legislation still allows the government to collect everything they want against Americans,” Rep. Rush Holt (D-N.J.) said before the vote.

The Center for Democracy and Technology, ACLU and other groups have come out against the legislation.

Speaker John Boehner still praised the bill. “People are a lot more comfortable with a government that is not storing all this metadata,” he said. It “makes it clear there will be no access to this data without a court decision and the standards for that decision are higher than they were.”