Minor modifications control flow