Hillary Clinton has spent the past few months going after Johnson Controls for moving its headquarters overseas, but during a campaign event on Monday, her husband Bill Clinton said that it is one of his "favorite companies."

The Clinton campaign first took aim at Johnson Controls in January, saying that its corporate inversion plan would "leave American taxpayers holding the bag" and that it was "outrageous." The Daily Beast labeled Johnson Controls as "Clinton's corporate villain." The Clinton campaign released an official ad directly targeting the company.

Apparently Bill Clinton did not get the memo. He described Johnson Controls as "one of my favorite companies" and praised the work it had done in the clean energy sector during an event in North Carolina on Monday.

Although Clinton's attack on Johnson Controls seems to be a change of tune for the campaign, the praise makes sense given the long history of business that the company has done with the Clinton Foundation.

The Washington Free Beacon reported in January that Johnson Controls has contributed more than $100,000 to the Clinton Foundation and also partnered with it on numerous projects over the past eight years and as recently as 2015. Some of the Clinton Foundation projects included multi-million commitments from Johnson Controls.

Bill Clinton pointed out in his speech that his foundation has done business with Johnson Controls—something that Hillary Clinton is yet to mention since she began her crusade against the company.

"It’s a clean energy company that worked with our foundation to retrofit the Empire State Building, we cut the electric use in that old building by 40 percent, created 275 full-time jobs for two and a half years doing it," said Clinton of Johnson Controls.



He went on to criticize the company for its decision to leave the United States after coming to Congress and saying "please bail out the auto industry."

"Congress helped them, and they should have," Clinton said. "But then, as soon as they got well, they got under the influence of these activist shareholders who made them pretend to sell themselves to a company in Northern Ireland where they could pay a third of the taxes."

The Clinton campaign directed questions on Monday's remark to President Clinton's office, which chose not to comment.

Johnson Controls has fought back against the Clinton campaign's claim that it asked for and received money from the government during the auto bailout.

"Contrary to recent reports and comments, Johnson Controls did not request or receive aid from the government during the financial crisis," a company spokesman said last month. "Nor did it declare bankruptcy or seek other means of protection like many of its competitors and other suppliers did at the time."

Johnson Controls also disputes that its decision to merge with Irish company Tyco is rooted solely in a desire to lower its tax burden.

"This merger is motivated by the incredible opportunity to combine the global leader in building controls, HVAC, and energy, with the global leader in fire and security solutions to create the buildings and cities of the future," the spokesman said, calling it "the next step in our journey to grow in the United States and globally, drive innovation, and invest in customer solutions that make buildings smarter, more secure, and more energy-efficient."