Fixed call stack issue for large programs