Jack Dorsey will remain Twitter’s CEO as part of a deal.

New York-based activist investor firm Elliott Management Corp. took a sizable stake in Twitter Inc., and quickly announced plans to push for changes at the social media company, which included replacing CEO Jack Dorsey, however, after two weeks of battle.

But now, per The Verge, it seems Jack Dorsey will remain Twitter’s CEO as part of a deal the company reached with Elliott Management. The deal, reported by PR Newswire, adds that in connection with the investment and the Cooperation Agreement, Egon Durban, co-CEO and managing partner of Silver Lake, and Jesse Cohn, partner at Elliott, will be appointed to the Twitter Board of Directors. Also, the deal sees Twitter committing to buy back $2 billion worth of stock. It’s also naming two new board members: one from Elliott Management and one from Silver Lake, an investment firm that’s putting $1 billion into Twitter to fund the buybacks. The new board members will be part of a committee evaluating “the CEO succession plan.” They’ll be joined by three additional board members, all of whom currently serve on the board. The group intends to share their findings publicly by the end of the year.

This announcement comes at a pivotal time, as the coronavirus outbreak peaks, the U.S. election heats up, and the Summer Olympics sense uncertainty, all events which tend to attract more users and advertisers to Twitter.

Since Dorsey returned as CEO in July 2015, the company’s shares have fallen 6.2%, while Facebook’s have gained more than 121% during that time.