Fix subtle MIME parsing bug