fixed issue when last bet is not found

and fixed balance checking