fix vote functionality in vote_controller.js