fix logic bug in lottery game