Issue with Can Walk Off Ledges false doesn't work right

For whatever reason, when i set my character to not be able to walk off ledges, it gets stuck in air like in the image below. How would i make it stop right on the ledge, not walk off and stop mid air?

Thanks in advance

Got him to not walk off the ledge and get stuck in the air with raising Perch RadiusThreshold and enabling Use Flat Base for Floor Checks, but now he gets stuck in the ledges.