fix namepart error message issue