IK Knee bending in the wrong direction

Hi so i am having a problem where my characters right knee goes far right and my foot backwards too far i don’t have this problem with my left side if anyone can help will be most greatfull i have posted the code and image of what is happening








help9
help10