NavMeshAgent dissabling issue in 5.0

Greetings community I’ve been trying to dissable the navmeshagent from code once my character dies. But instead the script itself is disabled I have my navmeshagent class named as navi i got its component in the awake function and I got navi.enable=false; in the condition when the character dies. I need him to stop but it stops once it reaches a point after it dies. It is controlled by Ai while other ai find and kill him. The other ai stops once he dies because the navmeshagent is dissabled succesfully but it doesnt hapoen with the character I mentioned. It does have the script and the agent in it’s components… may be a unity bug? I cant really update my unity for now if you could give me a good alternative than updating i will be gratefull!

Dear God, I’m so ashamed lol. I had a function that disabled the script before it enter the condition