Because of CNN's report, the Senate and House passed new legislation Thursday to close the loophole that could have allowed family members of some lawmakers to profit from inside information.

Senators who were critical of the loophole after it was unearthed applauded the fix.

The STOCK Act, one of the rare bipartisan bills passed this year, was signed by President Barack Obama in April.

Lawmakers proclaimed that the bill, officially called the Stop Trading on Congressional Knowledge Act, would restore trust in government. It also applied new rules to some employees of the executive branch.