Added some exception code