Sen. Elizabeth Warren (D-MA) benefited financially from the existence of private prisons despite vowing to ban them on the grounds that they are “profiteering off cruelty,” a report from the Washington Free Beacon revealed.

Warren pledged in June to ban private immigration centers and private prisons, detailing the vow in a Medium post.

“There should be no place in America for profiting off putting more people behind bars or in detention,” Warren wrote:

We didn’t get here by chance. Washington works hand-in-hand with private prison companies, who spend millions on lobbyists, campaign contributions, and revolving-door hires — all to turn our criminal and immigration policies into ones that prioritize making them rich instead of keeping us safe.

“That’s why I will shut down the use of federal private detention facilities by ending all contracts that the Bureau of Prisons, ICE, and the U.S. Marshals Service have with private detention providers,” Warren continued, accusing private prisons of engaging in “exploitation, plain and simple.”

She even implicated the Trump administration, accusing it of luring in private prison companies, which “saw their chance to run the same playbook for our immigration system.”

Despite those pleas, Warren has benefited financially from the existence of private prisons.

According to the Free Beacon, Warren invested tens of thousands of dollars — $50,000 — in a Vanguard Group fund which “owned hundreds of millions of dollars worth of shares in leading private prison companies. While she sold her stakes in that fund in 2013, the Free Beacon noted that it was “the largest shareholder of America’s largest private prison corporation” at the time.

The Free Beacon reported:

Warren invested in Vanguard Target Retirement 2025—a retirement account run by the Vanguard Group, an investment management company—which in turn invested more than 30 percent of its money in Vanguard’s domestic stock index fund. Vanguard was the top shareholder of Corrections Corporation of America (CCA), and one of the largest of GEO Group, both private prison companies, according to data from the Securities and Exchange Commission. Vanguard owned more than 12 million CCA shares and nearly 9 million GEO Group shares, which were worth roughly $456 million and $216 million, respectively, in March 2013. CCA, now called CoreCivic, was already the country’s largest owner of private prisons in 2013, according to an annual report. The company owned or controlled more than 50 correctional or detention facilities in the country, “with a total design capacity of approximately 86,000 beds in 20 states and the District of Columbia.” GEO Group is also one of the largest private prison providers in the country with 66 prison facilities across the world as of 2013. The two companies also operate many Immigration and Customs Enforcement (ICE) detention facilities for illegal immigrants.

Warren’s investment in the fund stands in stark contrast with the presidential candidate’s accusatory remarks over the summer, in which she accused private prisons and the financial beneficiaries of “profiteering off cruelty.”