Fix bug when list items don't have existing classes