UB_resc: Fix "back to main script" logic