And everything is going to be fixed in eternity... As stated above, every deed endures for the sake of the perfection destined to be revealed afterwards for the eternal delight of the souls. (The souls will enjoy the perfection of the governmental order that will be revealed through that deed.)...every single thing in accordance with everything that has already been done... As we have said, everything is affected by everything....whether they be equivalent, contrary or opposite to one another. These are the three possible kinds.
Tikkun Olam on Shabbat
Kalach Pitchei Chokhmah 87:7