(Reuters) - Dish Network Corp DISH.O reported better-than-expected quarterly profit and revenue on Friday, as the company lost fewer satellite TV subscribers than expected and said it was on track to build the first phase of its wireless network.

The U.S. satellite TV provider has struggled to stop losses from cord-cutting as viewers move to cheaper online streaming services, and is working to diversify its business by eventually launching a 5G wireless network.

Shares ended 14.5 percent higher at $34.20 on the New York Stock Exchange.

The company shed a net 192,000 satellite customers during the second quarter, below analyst expectations for losses of 235,000 customers, according to research firm FactSet.

Dish’s pay-TV business is showing signs of stabilization, “and this should give investors comfort,” Jonathan Chaplin, an analyst with New Street Research, said in a note.

Dish’s streaming service Sling TV added 41,000 subscribers during the quarter, missing analyst estimates of 68,000.

Sling had been focusing its efforts on keeping subscribers who watch on full-screen TVs rather than smaller devices like smartphones, Sling executives previously told Reuters, because those viewers tend to watch more shows.

Efforts include rolling out design changes and updates first to its TV app and introducing “a la carte” channels to lure former Sling customers back to their television sets.

Still, Dish said Friday it may lose more TV subscribers because of a blackout of Spanish-language TV network Univision, due to a dispute over fees.

Dish has also been under pressure to build the first phase of its wireless network - a narrowband Internet of Things network - and use its stockpile of spectrum before the licenses expire in 2020.

Dish Chief Executive W. Erik Carlson said during the conference call with analysts that Dish was on track to launch the IoT network by March 2020.

However, Dish Chairman Charlie Ergen said during the call the company would not be able to begin building its larger goal of a 5G network until 2020, because it still needs certain spectrum that must be cleared by the Federal Communications Commission.

Dish’s churn rate, or the percentage of subscribers who cancel a service, fell to 1.46 percent from 1.83 percent last year.

Revenue fell 5 percent to $3.46 billion.

Net income rose to $439 million, or 83 cents per share, in the second quarter ended June 30 from $40 million, or 9 cents per share, a year earlier.

Analysts on average had expected earnings of 71 cents per share and revenue of $3.44 billion, according to Thomson Reuters I/B/E/S.