         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) ->


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

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

    destroy: ->
