Fixed a few issues with multipart MIME handling.