Fix bug in name search.