[fix] invalid scope at returns