We're glad they worked things out!

Beyonce didn't have an easy time getting over Jay-Z's infidelity and the couple almost split because of it, People reports.

"It was very rough for them to stay married. It took Beyoncé a long time to trust again. She was struggling to move on and forgive. But keeping her family together was very important," a source dished to the mag.

Their love for their daughter Blue Ivy is what motivated them to fix their issues.

"If it’s wasn’t for Blue Ivy, they might not be together. It took them years to get to the point where they are now. They are very proud that they overcame huge marital issues and happy they were able to move on as a family. Having more babies together made them even closer," the source added, referencing twins Rumi and Sir.

We still can't believe Hova would cheat on Queen B!