Facebook‘s fourth quarter marks the close of 2017’s fiscal year, one of the company’s more difficult years as a public company — and it showed in the company’s earnings report.

“Already last quarter, we made changes to show fewer viral videos to make sure people’s time is well spent. In total, we made changes that reduced time spent on Facebook by roughly 50 million hours every day,” co-founder and CEO Mark Zuckerberg said in the earnings release.

The company also said it cracked down on e-commerce vendors that had “misleading” ads during the holidays.

Zuckerberg has vowed to fix the issues at the social network, after a series of headlines highlighted botched advertising metrics and targeting tools. Critics have also raised concerns about censorship, safety and the addictive qualities of social media. But perhaps the most pervasive issue has been evidence that Russian actors may have used social media or “fake news” as a tool to influence the last U.S. presidential election.

The solutions to these problems could require future hits to Facebook’s top and bottom lines. The company said that “some measures of engagement” may fall as the News Feed shifts away from featuring publisher content — which could affect Facebook’s advertising business.

Facebook has also pledged to double its 10,000-person safety and security staff by end of 2018. These changes would all come on top of ongoing projects for the company, like investments in data centers to support more video, and an effort to limit the number of ads, or “ad load,” on the platform.

Facebook said that its staff has already swelled 47 percent over the past year, and capital expenditures are projected to roughly double, as expected.

“2017 was a strong year for Facebook, but it was also a hard one,” Zuckerberg said.

Still, analysts at UBS said, there remains a “wall of worry” around whether Facebook is in a transition period around when it comes to user engagement.

Nonetheless, Facebook still has new revenue sources it can mine for growth, including its ownership of WhatsApp, Instagram and Oculus, none of which have been heavily monetized.

Advertising revenue at Facebook grew 48 percent from a year ago. Eighty-nine percent of advertising revenue came from mobile users.

And like many companies, Facebook will face new tax benefits after a recent federal overhaul.

Facebook also said that as a result of the tax bill there was an additional $2.27 billion in taxes for 2017, decreasing diluted earnings by 77 cents per share for both the fourth quarter and all of last year. But paying that tax will free Facebook to bring back overseas cash at a lower tax rate.

Executives on a conference call emphasized not only their investments in safety, but also services for international clients and small businesses, and Facebook’s support of job creation.

“Advertising should be safe and civil,” chief operating officer Sheryl Sandberg said.