Help with IK logic

I have an error with my foot IK. If I stand on the edge of a wall, one foot goes to the bottom of the wall and the other stays ontop, giving my character some rubber band-like legs. I am using PowerIK, which is a marketplace plugin that was purchased by epic. Does anyone know how to fix this?

345278-error.png

I answered my own question. I made the raycast that goes into the ground have a shorter distance so it cant reach the floor below.