Fix retrieving votes from database

Co-authors:
Barry Bilecth <bbiletch@wpi.edu>
Ryan Killea <rkillea@wpi.edu>
Long Nguyen Duc Hoang <lhnguyenduc@wpi.edu>