Problem with buying/selling to any npc with plugin

Attempting to buy/sell to any npc using a custom made plugin results in an automatic client crash if bot is not turned on.
e.g. I have made a plugin that buys hp potion from grocery npc with a chat command.
the plugin works perfectly fine, it buys and sells, but the client crashes in the process.
If i attempt to incoporate these commands into a script command instead of chat, it works perfectly fine without crashing the client.
If i also make a script that does nothing but wait and run these chat commands, the client doesnt crash.
this problem has been occuring for about a year now.
but my bot version is 27.8.6
windows 10
private server local is vsro
Is it possible to fix this so one can run these type of plugins without crashing the client ? @Ryan