fix lottery exception code