       Bacon.mergeAll(_queued, _progress, _success, _error, _signError).toProperty(waiting: true, start: _start)
 
     uploadParts = (parts, objectPath, uploadId) ->
-      uploads = _(parts).map (part) -> prepareForUpload(part, objectPath, uploadId)
+      uploads = _.map parts, (part) -> prepareForUpload(part, objectPath, uploadId)
 
       bitrateEstimator.init()
 


    upload = (file) ->
      partSize = computePartSize file.size
      parts = _(splitIntoParts(file, partSize)).map (part) -> key: part[0], data: part[1]

      sanitizedFileName = file.name.replace(/[^0-9a-z.]/gi, "_").toLowerCase()


        concurrencyLevel = if concurrent then MAX_CONCURRENT_PARTS_UPLOAD else 1

        if failed.length
          _.delay _.first(failed).retry, 1000
        else if waiting.length and (queued.length + uploading.length) < concurrencyLevel
          _.first(waiting).start()

        if complete.length is parts.length
          complete: true
          parts: parts
        else if uploading.length
          uploaded = _.reduce(uploading, ((s, x) -> s + x.uploaded), 0) + _.reduce(complete, ((s,x) -> s + x.part.data.size), 0)
          total = _.reduce(parts, ((s,x) -> s + x.data.size), 0)
          uploadSpeed = bitrateEstimator.compute uploaded

          uploading: true
