Adding a control rig to a deform rig wich has very odd bone rotations

Hello, i finally managed to get a proper import-export pipeline for UE4, wich allows to add new animations to the existing character skeletons in the engine. Using FBX export/import.
Everyone knows FBX support for rigs its completely terrible and does really odd stuff.
I managed to get it working at least, but the imported bones have all 90-ish degree rotations. I copied the rig and used it to create a well rigged control rig with IK/FK and proper bone structure, following the original rig.
The problem i have its that i want to hook the original deform rig with the control rig, so i can use my control rig and then export the animation. Using the CopyLocation nodes works fine, for the location(:eyebrowlift:) but, as the original bones are pointing other way,using the copyRotation or just the CopyTransform node results in complete disaster. What i need its to just add 90 degrees to the result of the copyRotation, and that way the bones would be properly oriented, but i find no way to do that.
Things ive tried: IK, Track To, Transform, CopyRotation with offset.

I come here asking for help for it, if someone knows a way to get it right, please respond. Here is a picture of the 2 rigs.


The blue Stick rig its my “control” rig, while the octahedron monstruosity its the original rig. It has to have those bone orientations, else it wont be compatible with the original character.

Nevermind, i found a way to do it. I copied the deform rig into a new one, then set up a script to add a load of Copy Transform nodes from the deform rig to the copied one. THEN, in the copied one skeleton, i created the normal rig, and set up the parenting relations from the copied bones into the corresponding bones of the better rig. Gonna upload the finished rig soon.