Ragdoll/character joint problem

I have an animated character that becomes a rag doll when he dies. If he dies in the standing position the ragdoll works great, but if he dies while crouching his legs don’t work properly and the torso stretches out.

How do I fix this?

Can anyone give me a hand with this? The way I am doing it is I have all the joints set to isKinematic=true, and when he dies change isKinematic back to false and disable the animation component.

is this how I am supposed to do it?