fixed vote function