fixed code for upvote