Data transfer modifier. Bad results.

Hi there.
I am trying to use the data transfer modifier, so one object would get the same UV data as another object.
The topology of the two objects is the same, they are just shaped differently, and it transfers the data without an error or anything.
However, the target object vertexes receive the wrong random UV coordinates from the source object, and the result is a complete mess.
I tried changing the verstex order, and I played around with anything I could think of, but still, the result is a mess.
Any ideas why?