Fix edit of entity type