fix semicolon command in recursive function