fix HTML5 validation errors
sort labels incase-sensitive (closes #37)