Blender to Unreal Wrong order for Bones

Hello guys, I’m working in a character that I want to import to Unreal, the mesh seems fine but the armature is all mess up, the bones appear in the wrong order as they where always one bone behind, and some of the bones are just no where near they should be.

In Blender:

In Unreal Engine 4.18:

I still don’t know why this happens, but it turns out that the animation and attaching things to the bones works anyway for some reason O_o