fix null values and improved support of email-map file