Investors who own shares of social media giant Twitter received good news on Thursday, as the company posted gains of more than 15 percent. According to a report from CNBC, the stock’s rise is attributed to the stunning revenue report, which showed that the company made $758 million, much more than the $702.6 million that analysts had expected. This amounts to earnings of about 21 cents per share.

“We’re achieving meaningful progress in our efforts to make Twitter a healthier and valuable everyday service,” said Twitter’s CEO Jack Dorsey in a press release. “We’re doing a better job detecting and removing spammy and suspicious accounts at sign-up. We’re also continuing to introduce improvements that make it easier for people to follow events, topics and interests on Twitter, like adding support for U.S. TV shows in our new event infrastructure. This quarter’s strong results prove we can prioritize the long-term health of Twitter while growing the number of people who participate in public conversation.”

The company’s revenue boost was driven by a 29 percent increase in advertising revenue, which topped out at $650 million over the last 12 months.

Many investors were surprised by the company’s strong financial performance, as the company lost a significant number of monthly active users (MAUs) over the last quarter. According to CNBC, the company lost about 4 million MAUs between 2017 and 2018.

The company deleted many of these users in a new initiative to crack down on troll and fake accounts. According to Market Watch, this is part of a strategy to boost the number of daily active users (DAUs) by making the site more user-friendly.

“This is the third quarter in a row where we’ve grown revenue in excess of audience as we continue to deliver better formats, better relevance against a larger and more engaged audience, we’re delivering better for advertisers,” said Twitter’s Chief Financial Officer, Ned Segal, while speaking to analysts.

Facebook, one of Twitter’s largest competitors, also saw a modest increase in stock price on Thursday. According to CNBC, shares of the company were trading at $150.95 at the time this article was written.

Although shares of the company were on the rise, Facebook was recently fined almost $650,000 by the United Kingdom’s Information Commissioner’s Office for “failing to safeguard users personal information.”

“Facebook failed to sufficiently protect the privacy of its users before, during and after the unlawful processing of this data,” said Elizabeth Denham, the UK’s Information Commissioner, according to CNBC. “A company of its size and expertise should have known better and it should have done better.”