Fix invalid HTML for lists