Ai running animation glitches

Got a problem with the running animation for my Ai. It works, but for some reason the animation glitches every time the Ai takes a step. Every time it takes a step, it looks like it’s going back to idle position,and starts running again. I triple checked everything i did, tried to re-import the animations but the problem is still there. The blend space blueprint is made exactly the way i made it for the player, and the animation blueprint too. exept that in the animation blueprint i cast to ai character and not to third person character. I can’t figure out what to do to fix the problem. Please help me.

i also have these pics if you need them:

I think that the problem is in the walk to idle and idle to walk…try to use the same value for both,or when the velocity is between 5 and 10 the AI doesn’t know what to do