Yeah your animations are conflicting. I normally have multiple groups for animations, then toggle them on or off so they don't conflict.
Try putting all your 'basic' animations in a group like walking, idle, jumping, falling, etc. Then put your attacking ones in another group.
When you attack, deactivate the basic animation group. When the attack animation is finished, or your attacking value is 1 but the animation is not playing, re-activate the basic group and deactivate the attacking group.
You can also just add more conditions like "Play idle if attacking is 0" but that can get messy.