Fix match_winner and complete_match functions. Have to update in database too