fix calculating votes