Fix some issues in the multipart parser