IK hand rotates strange when trying to match it to weapon

I have a problem with ik hand rotation. I am trying to match hand bone with AK bone, but i have strange effect. How can i fix it? I'm new in Blender))