Can you describe how the Z axis rotation is wrong? I’m having trouble understanding.
Also, the Z axis rotates in a different direction as opposed to X and Y. Try it in the editor with any object, adjust the rotation values under the Transform section in the details pane. Does using (0, 0, -1) for your Z vector work better?