Fix nil exception in name matching.