My take: the first is fine; in the second, of should be deleted.
New words, one handy idiom, and a 2-minute quiz — delivered to your inbox to keep your streak alive.
SnappyDo I need "the" before "gerund + of"?Yes. Generally it's "the ...-ing of ..." or just "... ing" without 'the' or 'of', and you'll probably find the second pattern more often.