Minor fixes for multipart handling