It is found that all known gases cool slightly on undergoing a free expansion. This is consistent with the kinetic theory idea that temperature is associated with the kinetic energy of the molecules. If the gas expands, then the intermolecular attraction potential energy goes up as the molecules get further apart. - Finn thermal
See the quotation above. I am not sure how does the statement in italic implies the "fact" in bold, that is, why the expansion of a gas increase the potential energy.
Shouldn't the expansion implies the opposite? That is, the molecules gets further apart, and as all potential decrease with distance, shouldn't the potential goes down?