Corrected MIME data handling and storage