Come out in the wash

To work out all right, to turn out well in the end, to become understood eventually.

Everything came out in the wash as the students discussed their problems.