fix bugs with multipart upload and add passing test