fix checkVote method