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

        params.size = params.data.byteLength
      if not params.transfer
        params.transfer = false
      if not params.onDone
        params.onDone = ->
      @worker.queue params

    finalize: (callback) ->

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

    destroy: ->
