UPoseableMeshComponent is incorrect when rotating bone with FRotator.Pitch

When rotate bone with following code the bone get stuck when crossing Z axis and seems to flip back and forth. Works fine when rotating Yaw or Roll.

Using UPoseableMeshComponent* mesh;

FRotator rot = mesh->GetBoneRotationByName(FName(“Bone”), EBoneSpaces::ComponentSpace);
rot.Pitch += 10.0f;
mesh->SetBoneRotationByName(FName(“Bone”), rot, EBoneSpaces::ComponentSpace);