Some mecanim questions and help

Quick question on mecanim transitions, I have a fight animation that I would like to go into from the idle state and that works great no problem, but trying to transition back to idle state has become the issue, I have watched the basic videos and thought that I had the hang of it but I was wrong but this is what I have in my update function;

if (currentBaseState.nameHash == idleState)
        {
            if (Input.GetButton("Fight"))
            {
                anim.SetBool("Fight", true);
            }
        }
         else if (currentBaseState.nameHash == fightState)
        {
            if (!anim.IsInTransition(0))
            {
                anim.SetBool("Fight", false);
             }
           
        }

Now I have my exitTime set in mecanim so that when the animation stops playing it goes right back into idel and animation fight is set to false. Don’t know what I am doing wrong but any help is appreciated.

Solved the issue sorry about that, my naming conventions were not correct in my code.