I am more likely to be one of your customers than someone who can give you any meaningful help,BUT
I sort of think the subroutines should endif before the return is called, so you do not overflow the stack. I might be wrong, but that is my thoughts.