Fixed email notification issues