Fix bug with text files (or html files) attachments.