         params.size = params.data.byteLength
       if not params.transfer
         params.transfer = false
-      if not params.onDone
-        params.onDone = ->
+      params.onDone = callback
       @worker.queue params
 
     finalize: (callback) ->

      params = 
        message: 'finalize'
        onDone: callback
      @worker.queue params

    destroy: ->


    @handler =
      progress: ->
        progress = self.totalSizeProcessed / (self.totalSize or self.totalSizeQueued)
        self.onProgress? progress
        self.busy = false
        self.flush()
