fixed bug in voting js