schedLottery not working - segm fault