Why isnt this animations working on the mesh?

Im trying to import an animation using an existing skeleton. Both the animation and the skeleton is using the same bone structure and names, but the mesh is getting messed up.
The animation is moving like its supposed to but it looks like this:

I thought only I had such troubles