fixing vote sorting