Snap Inc. (SNAP), the owner of disappearing message app Snapchat, may not be dead and buried after all.

The company’s fourth quarter results comfortably beat Wall Street forecasts for the first time since its initial public offering, giving investors reason to believe that the worst of the Los Angeles, California-based tech firms troubles are now behind it. The stock jumped as much as 31 percent in extended trading after Snap reported better than expected sales figures, driven by rising user numbers and greater advertising spend on its Snapchat app.

News of positive progress, following months of disappointment and uncertainty, lifted the stock above the $17 price it floated at back in March 2017 for the first time since July.

Turning a Corner

Before publishing its fourth-quarter results, Snap’s shares were languishing at about $13.99 due to concerns of stagnant user growth and depressed ad prices. In the final months of 2017, the company addressed both of these issues far quicker than analysts and its many bears had expected. (See also: Snapchat Overhaul Convinces Investors It Can Fight Instagram.)

Snapchat added 8.9 million new users and reported 187 million daily active users in the fourth quarter, up 18 percent from a year ago and ahead of the 184.3 million estimated by analysts. That successful turnaround helped the company to generate revenues of $285.7 million, comfortably beating the $252.8 million expected by Wall Street.

Snapchat also made good on its move to introduce an automated bidding process for selling ads. The company sold 90 percent of its advertising through its automated software in the fourth quarter, despite previously warning investors that the transition had been slower than expected.

New investments cost less than anticipated, too. In the fourth quarter, Snap reported net losses $50 million below analyst forecasts at $350 million. The company also reduced its cash burn by 49 percent over the prior quarter to $255 million, thanks to the economies of scale offered by its new self-service advertising business.

Short Sellers Get Caught Out

Snap’s better than expected quarter gave its increasing number short sellers plenty to think about. Bearish sentiment toward the stock rose over the past month, representing 23 percent of shares available to trade before the company reported its latest results, according to Markit data, reported on by Bloomberg. Short sellers reportedly represented 16 percent of shares at the beginning of the year.

“This eye popping top-line beat was a shocker,” GBH Insights analyst Daniel Ives, who rates the shares “attractive,” said in a note, according to Bloomberg. “This quarter was a major step in the right direction for the company and will be a tough pill to swallow for all the naysayers.” (See also: Snap's VP of Product Announces Exit Amid Crucial Redesign Rollout.)

Want to learn how to invest?

Get a free 10 week email series that will teach you how to start investing.

Delivered twice a week, straight to your inbox.