Mesh completely distorted when assigning animation

Hey guys!

After a while without touching this problem, it turned out that I found the solution. It had nothing to do with the retarget process, it was working correctly. The issue was that some of my joints had rotation other than 0, it apparently messed up with the retarget. I recreated my skeleton in Maya, adjusted the skin wieghts and retargeted again in UE4. It worked perfectly as a different skeleton.