small fixes to lottery example