TikTok may be facing a countdown that could lead to its ban in the United States, but the hugely popular social video platform has managed to put at least one significant controversy behind it.

On Wednesday night, TikTok and Universal Music Group, the world’s biggest recorded music company, announced a new licensing deal that will return some of music’s biggest performers and their songs to the platform.

The companies said the new deal also improves compensation for Universal Music Group songwriters and artists, whose music is used to accompany videos on the app.

Under the new agreement, the companies will also work to increase e-commerce opportunities for artists, among other efforts to help musicians make money on TikTok. ByteDance-owned TikTok said it is committed to removing unauthorized music generated by artificial intelligence on its platform.

The licensing deal ends a dispute that roiled the music industry and began in late January when the last deal expired. UMG said that TikTok was not paying “fair value for the music,” while TikTok accused UMG of putting “their own greed above the interests of their artists and songwriters.”

TikTok’s Chinese parent company faces pressure under a new law to sell TikTok’s U.S. operations in 180 days, or else the app will be banned here.

TikTok said it plans to contest the law in U.S. court.