Cooling at least part of the working fluid in a heat exchanger