How do I bend the legs properly on the Ultimate Rig?

When I first started making GFX I used the PaintRigV3 rig. But now I want to switch to the Ultimate Rig made by MattRBX. But the only problem is when I bend the legs I don’t know how I bend them backwards and kept them bent. Same with forwards.

For example it should look like this:

But instead it looks like this?

If anyone knows how to fix this it would be greatly appreciated