fix multipart race conditions