YouTube keeps trying to show that it’s a friend to the music industry. Earlier this week it published a blog post highlighting the fact that, in the last year, it paid out more than $1 billion to the music industry from advertising alone. Today came an announcement that YouTube has reached a deal with the National Music Publishers’ Association to pay millions in royalties to songwriters.

The settlement is reported to be between $30 and $40 million — about the same size as a deal reached by Spotify with the group earlier this year. The money will go to songwriters and publishers who may not have been paid because a lot of online music lacks the proper data, making it hard to establish credit for those streams and pay out royalties.

Will the music industry finally forgive YouTube?

The agreement will try to prevent this problem from cropping up in the future by offering publishers access to songs where YouTube has incomplete data, allowing them to fill in the blanks before they miss a paycheck. This is an opt-in process, and those who don’t join retain their right to sue for copyright infringement instead.

“We appreciate YouTube’s willingness to work with us on behalf of the industry to help pay out millions of dollars in previously unclaimed royalties to publishers and songwriters,” said NMPA president and CEO David Israelite in a statement. “It is essential that we work with digital services like YouTube — the most popular digital platform for music discovery — to fix the challenge of incomplete ownership information to ensure royalties are no longer unmatched and music owners are paid accurately by the platforms that rely on their work.”