Bugfix: Use first primary name to search in stead of the last one.