made some minor change to the mail system