fixed some mail issues