Joe Ianniello finally got the interim tag taken off his CEO title at CBS, albeit under Bob Bakish, and has signed a new contract to boot, TheWrap has learned.

Ianniello, who was named chairman and CEO of CBS on Tuesday as part of the company’s merger announcement with Viacom, is extending his stay at CBS through 2021, an individual with knowledge of the agreement told TheWrap. Ianniello’s previous contract was slated to expire in January, the same time CBS and Viacom expect their merger to be closed, leading to speculation that he would leave.

As announced Tuesday, CBS and Viacom will join together to form ViacomCBS, which will see Bakish become the chairman and CEO of the combined company. Ianniello had been serving as president and acting CEO of CBS Corp since last fall, following the resignation of Leslie Moonves.

Also Read: ViacomCBS Merger Caps Hollywood's 'Eat or Get Eaten' Consolidation Era

The two companies agreed to an all-stock deal that valued Viacom at roughly $12 billion. CBS shareholders will own approximately 61% and Viacom shareholders will own approximately 39% of the new company, which is named ViacomCBS. In making the announcement, ViacomCBS touted an annual revenue of $28 billion.

“This merger brings an exciting new set of opportunities to both companies. At CBS, we have outstanding momentum right now -creatively and operationally -and Viacom’s portfolio will help accelerate that progress,” Ianniello said in announcing the merger earlier on Tuesday. “I look forward to all we will do together as we build on our ongoing success. And personally, I am pleased to remain focused on CBS’s top priority -continuing our transformation into a global, multiplatform, premium content company.”

Variety first reported the news of Ianniello’s new deal.