fixing a bug on the mail message parsing