Fix empty entity name crash and exclude empties