wacky mesh movement when using control rig

hello. im making a control rig for my character and for some reason the limbs bend in a weird way when I rotate the base control of said limb

provided pictures:


you can see the ankle bends weird. I checked if it was something to do with weight paintings and it was the same as the other side (which functions normally as you can see here)

I would like it to function like the other side does. In the case that the problem occurs in the way I set things up in the blueprint graph, I will provide that too

Any ways to fix this?