Wendy’s posted its 18th consecutive quarter of positive same-store sales Wednesday, beating profit and sales estimates and sending share values up despite reporting a net loss.

The quick-service giant attributed the net loss of $1.8 million to a series of restaurant transactions, which included the acquisition of 140 Maryland, Virginia, and Washington, D.C., restaurants from franchise partner DavCo. After the acquisition, Wendy’s immediately sold the locations to NPC International and incurred a loss of $43.1 million. NPC plans to remodel 90 of those restaurants by the end of 2021 and build 15 new restaurants by the end of 2022.

During the quarter, longtime Ohio-based Wendy’s franchisee Cedar Enterprises (led by former Wendy’s executive and current Sbarro CEO J. David Karam) also sold its 220 restaurants to several companies, according to the Columbus Dispatch.

Wendy’s continues to facilitate franchisee-to-franchisee transfers, known as buy and flips, to ensure that restaurants are operated by what it says are well-capitalized franchisees that are committed to long-term growth. During the quarter, the company facilitated 294 buy and flips, and expects to complete approximately 475 in 2017.

The brand’s image activation plan to remodel existing restaurants and build new restaurants will remain an integral part of its global growth strategy. Thirty six percent of all international restaurants feature the new design, and Wendy’s expects that 42 percent will be image activated by 2017.

Wendy’s reported a 3.2 percent same-store sales increase over the year and a revenue decrease of 16.3 percent, primarily due to 251 fewer company operated restaurants. Franchise royalty revenues have increased by nearly 27 percent since 2016.

“More than one-third of the global system is now Image Activated and we continue advancing towards our global expansion goals with 35 new restaurant openings during the second quarter and 68 openings year-to-date,” CEO and president Todd Penegor said in a statement. “We, along with our exceptional and dedicated franchisees across the globe, remain committed to delighting every customer and to our brand purpose of creating joy and opportunity through our food, family, and community.”

Fast Food, Finance, News, Wendy's