removed some NOTICE erros and fixed one stupid big with email sending callback (thanks to Komannder)