Ai Pathfinding / not go through or over structures?

I have noticed that when I put an ai into the game that when there is terrain in the way it goes over it or through it. The terrain I used was a tall wall so that it could not simply just "walk" over it. Is there a way to fix this?