Personally, I never use a gosub. Every time you use gosub, it puts the return address on the stack. If you don't return from the subroutine, the address stays on the stack. The stack can get corrupted. And your code always needs to be aware that it should be ready for the return.
It can get especially ugly if you do gosub calls from your menu routine and then end up doing a gosub back to the menu from one of those subroutines.
I'd have to see more of your code to know what you should do and I don't want to look at the whole project (I have a lot to do right now).
I would recommend looking at your code and seeing if using functions would be clearer in the flow of it. And, if you use functions, remember that any variables that were used in the subroutines probably would need to be explicitly defined as globals. That would be what you would want to do if you simply turned your subroutines into functions without passing in values.
Cheers,
Ancient Lady
AGK Community Tester