fix a bug in voting