Under Armour Inc. (UAA) is on track to return to profitability in the next year and a half, according to Moody’s Corp. The credit rating agency said that Under Armour first needs to work through a glut of inventory and adjust its cost structure toward lower sales. But Under Armour, with its worldwide relevance, can benefit from its strong position in direct-to-consumer sales

Moody’s analysts, led by Michael Zuccaro, said much of the sports apparel maker's troubles are “self-inflicted” with its “inconsistent” strategies. They cited the fact that Under Armour’s new planning system caused disruptions in its supply chain. That, in turn, caused delayed shipments and lower productivity.

Under Armour once regularly saw 20% year-over-year growth in sales until about two years ago. But now, thanks to struggles in sales in North America, its seeing sales growth in the low single digits. In 2017, overall sales grew 3.1% while in North America they fell 5.1%.

Looking to China

“Innovation remains critical if it hopes to stay competitive with its two larger rivals, Nike and Adidas,” Moody’s analysts wrote. Under Armour shares are down 19% in the past year, and down about 6% in the past month. (See also: Why Under Armour Faces Steeper Declines.)

Moody’s says Under Armour can significantly benefit from its position in the global market, particularly in China, where more participation in sports is driving more sales of athletic wear.

This year, Under Armour is making a series of cost-cutting moves it believes will save it at least $75 million per year.

“For the first nine months of 2018, we expect the company to generate negative free cash flow due to lower earnings, normal working capital seasonality, continued spending in key growth areas, and $105 million in cash expenses related to the new 2018 restructuring plan,” Moody’s analysts wrote. (See also: Why Under Armour’s Plunge Has Only Begun.)