Bug with my 3rd person character movement animations / state machine

Ok, here are screenshots of my state machine and an example of one of the attack states with the bugs. How can I interrupt the leg moving part of this attack state when the the movement forward movement stops. By using “layered blend per bone” in the state can I even separate the movement of the weapon swinging upper body from the running lower body? Technically the legs should go in idle position while the upper body finishes the movement. But I start wondering if my approach with “layered blend per bone” is even the correct way. Where would I tell the state machine to stop moving the legs when speed is 0? In the Event Graph I have a boolean variable “IsMoving” for speed larger than 0. Can I use this boolean in the state machine somewhere to fix this?