finally fixed wager update function