Character deformation when using Inverse Kinematics

I have a problem, that when I use Inverse Kinematics and I set a pole target, then the bone’s turn in the wrong way. I solved this using the Pole angle, but when I parent the bones to the mesh, the limb just get rotated. So if I set the pole angle to 90° then the limb will turn 90°. Could somebody help me with this?