UPDATED at 7AM PT with executive comments:Viacom ended its fiscal year with a mixed-to-positive fourth quarter featuring a slim total revenue gain and better-than-expected advertising results but also softness in domestic affiliate revenue and ongoing struggles at Paramount.

Total revenue of $3.3 billion in the quarter ending Sept. 30 was up 3% from $3.2 billion in the year-earlier quarter. Net income reached $680 million ($1.69 a share), up from $432 million ($1.09) a year ago. While results in many areas exceeded Wall Street’s consensus estimates, adjusted diluted earnings of 77 cents undershot them by about a dime, despite a 12% year-over-year uptick.

The company highlighted modest growth in worldwide advertising revenue, stronger ratings at mainstay networks like MTV and BET and improved operating results at Paramount Pictures. But one notable soft spot was affiliate revenue — the money the company makes from distribution across cable, satellite and other systems — which dropped 3% in the U.S. to $948 million. And the company warned that affiliate revenue will likely decline in the mid-to-high single digits in 2018, a worse erosion than other programmers are experiencing.

That key metric, which for every programmer is under pressure given cord-cutting and cord-shaving, helps explain the reaction of investors to the quarterly numbers. Shares flirted with a new 52-week low, slipping as much as 9% in morning trade before recovering at midsession, down 2% to $24.

Paramount, long a scapegoat amid criticism of its weak margins, continued to show losses, but substantially smaller ones compared with a year ago. Total revenue in the film unit inched up 2% to $789 million, while the operating loss was $43 million, compared with $137 million in the year-earlier period. One blow to the results that the company had flagged last week was a $59 million expense related to the termination of Paramount’s slate financing arrangement with Huahua Media.

Bakish repeatedly praised Paramount during a 50-minute conference call with Wall Street analysts, saying it is a differentiating asset when Viacom is compared with many cable programming rivals. Asked for his view of the studio’s competitive position given merger discussions between Fox and Disney and concerns about its scale, Bakish said, “We view it as an integral part of the company.” The TV production side of Paramount tripled its revenue in 2017, he noted, with licensing gains of 30% stemming largely from its output. Plus, the new exec team led by Jim Gianopulos has his full confidence, he added. “That’s a business that we think is great as it is. We don’t believe we need to combine it with another film studio.”

The atmosphere at Viacom has calmed lately after several years of drama, a period marked by 94-year-old chairman emeritus Sumner Redstone’s war with former protege Philippe Dauman, a messy public feud that culminated in Dauman’s ouster. Amid a stream of tabloid headlines about Redstone’s medical condition and legal battles with former female companions, Viacom’s business had meanwhile continued to suffer under Dauman.

CEO Bob Bakish, a longtime international exec who succeeded Dauman last year, referenced those dark days briefly during the company’s conference call with Wall Street analysts. As the company secured new carriage deals with Charter and Altice, he said, “we had to address some friction in our relationships that had built up over time.” Dauman had insisted on severe terms even as Viacom networks, especially MTV and Nickelodeon, were deteriorating markedly. “We did all that at a time when we were revitalizing our product.” Tom Rutledge, CEO of Charter, put it more bluntly in an interview this morning with CNBC. “They let their product fall apart and their ratings reflected that.”

This quarter’s ratings at domestic networks, though, showed some bounce-back. Collectively they increased 3%, the company said, but flagship networks saw gains of 6% and MTV and BET increased by double digits. The ratings improvement led to advertising revenue of $936 million in the quarter, which was flat with a year ago, but better than the previous three years of decline.

A note sent out this morning by analyst Doug Creutz of Cowen typified the Wall Street response to Viacom’s results. “We expect worries about Viacom’s place in the ecosystem to ramp again when the next carriage deal comes around,” he wrote, reasserting a neutral rating on the stock. “We ultimately think the company’s positioning remains highly challenged.”