add all name fields to sql and fix static warning