fix bug for name util and rename some functions