fixed logic for winner updates to db