bug fix for sorting an enumeration in a bar chart