fix getBet logic