fixed a few multipart form handling bugs