Exporting Multiple Animations to DirectX

I would like to export all animation sets to a DirectX file (.x). I have written the code to export each “action” that has a fake user…the code simply interates through each action with a fake user and sets that action as current, then writes the animation set to file using the script that came with Blender. Simple enough, however, I’m experiencing problems with the skinning of the mesh in DirectX. I believe the problem lies in the initial transformations of the armature. When writing to file, the armature’s initial transformations are taken from the first action…when I update the frame hierarchy the transformations are incorrect during the transition from one animation to the next. I believe this is due to the differences in “location” between the “current action & initial action” and the “next action & initial action”.

Has anyone experienced a problem of this kind? I would appreciate any input…