Microsoft’s latest diversity report, released on Monday, shows mixed progress on gender diversity within the technology giant. First, the good news: Microsoft’s (MSFT) senior leadership team has a higher percentage of women than ever before (27.2%), and the company has just nominated two high-profile female executives to its board, bringing the total number of women on the board to three (out of 11). Now, the bad: The overall percentage of women at the company has shrunk from 29% last year to 26.8% this year.
That decline was caused by the company’s decision to shrink its international factory workforce, wrote Microsoft’s global diversity and inclusion general manager Gwen Houston in a blog post. “The workforce reductions resulting from the restructure of our phone hardware business impacted factory and production facilities outside the U.S. that produce handsets and hardware, and a higher percentage of those jobs were held by women,” she wrote, adding that it was a “strategic business decision” that lead to fewer female employees.
Yet women didn’t lose ground only in Microsoft’s factories. The company’s representation of women in tech jobs declined from 17.1% to 16.9%; non-tech from 44.5% to 41.7%; retail from 37.3% to 34.9%; and direct production factories from 60.8% to 57.9%.
However, Microsoft is making an effort to hire more women, which “is encouraging as we think about [the company’s] future,” as Houston puts it. Globally, 30.6% of university hires were women, up from 27.7% last year. Also within university hires, the number of women in technical/engineering roles increased from 23.7% to 26.1% this year.
Microsoft was of the least gender diverse of nine major players in Silicon Valley, according to Fortune‘s analysis of 2014 EEO-1 data—the standardized report filed with the U.S. government; the only company with a lower percentage of women in the workforce was Intel.
In racial and ethnic diversity, Microsoft is making slow, but noticeable progress: the company is now 59.2% white, compared to 60.5% last year. Within leadership, the company is 70.% white, compared to 72% last year. Blacks and latinos now make up 8.9% of the company, compared to 8.5% last year.
Subscribe to the Broadsheet, Fortune’s daily newsletter on the world’s most powerful women.