(frontend) Fix bug in recursive calls