(Reuters) - Sears Holdings Corp SHLD.O cut its third quarter loss by almost $200 million compared to a year ago, the company said on Thursday, benefiting from lower operating costs as it shut scores of Kmart and Sears outlets.

The company, whose warning of the risk of bankruptcy earlier this year was symbolic of the troubles of America’s biggest traditional retailers, racked up its 24th straight quarter of sales declines, reporting a double-digit drop in comparable sales at both Sears and Kmart.

Shares of Sears, which have been down more than 50 percent this year, surged 27 percent to $5.36 in pre-market trade and were the biggest gainers before the open.

“Losses are still terrible, but they are less bad than forecast and progress has been made in reducing them since last year,” Neil Saunders, Managing Director of GlobalData Retail, told Reuters.

He added that the pension deal Sears struck earlier this month also provides some certainty over future costs and will help the company’s bottom line in 2018 and 2019.

Sears said this month it had struck a deal that will help it reduce contributions to its pension plan for the next two years and monetize real estate that had formerly been protected.

Saunders, however, said the results gave little cause for celebration. “We still believe that Sears is a dying business ... Nothing in this latest set of results changes our view.”

Once the largest U.S. retailer, Sears in March flagged doubts that it could continue as a going concern as it suffered from the Amazon-fuelled shift in shoppers from the mall to the web.

It has struck brand licensing deals and promoted its shopper loyalty program in efforts to turn itself around.

“The improvement is reflective of the success of the strategic priorities we outlined earlier this year,” the firm’s billionaire owner, Chairman and Chief Executive Eddie Lampert said in a statement.

He said Sears had streamlined operations, reduced inventory and minimized operating expenses.

The company’s net loss attributable to shareholders was $558 million in the third quarter, in line with guidance of $525-$595 million given earlier this month but down from $748 million a year earlier.

Sears said it had taken in more than $270 million from sales of real estate and other assets in the third quarter, as well as an additional $167 million after the close of the quarter.

It used the proceeds to pay down debt; long-term debt and obligations fell to $2.03 billion at the end of the quarter from $2.41 billion three months earlier.