On Balancing the Flow Out of a Network with Gains