fix for parsing emails with incorrect encodings;