Fix an issue where empty elements were shown in the highlight list