Sorry I cannot help you much, but I can recommend you to base your bot on the official template from the Half-Life SDK. It is much clearer code and I guess that such bugs would not be present there.
https://github.com/ValveSoftware/hal...ame_shared/bot