Search/entity bug

Emergency fix for a bug that would crash your UI when selecting an entity (contact, company, teammate, group) either directly or through a search result.