Control Rig - Basic IK messing up mesh

Hi @MaarVFX
I went back and reorientated the joints in the leg,( many many times as i presumed that this must be the issue ) and ended with the ankle joint pointing down as originally mine was pointing towards ball joint in foot. I then set everything to 0 in secondary axis of ik handle and it worked. i wouldn’t quite call it a solution as I’m still not sure what exactly the issue was but it looks fine now.