Save voting correctly in the database.