fix upvoting and downvoting event handler