Save vote correctly in the database.