parenting bones in edit mode messes up the armature in pose mode

hey guys can someone look over the attached file maybe someone is more knowledgeable than me. I want to parent upper legs and pelvis bones to the lower_stomach so the character can essentially crouch. When I parent the bones and go into pose mode, the armature is all twisted up. What can I do to fix it? I tried clearing all rotations and transforms but its still twisted up after parenting.

Attachments

bones4.blend (1.02 MB)

Nevermiond it was the chain length on the leg thats messing it up