 			destroy: () ->
 				@shuttingDown = true
 				@resetState()
-				@pdfjs.then (document) =>
+				@pdfjs.then (document) ->
 					document.cleanup()
 					document.destroy()
-					resetWorker(@thread)
 
 		]

				# PDFJS.disableStream
				# PDFJS.disableRange
				@scale = @options.scale || 1
				@thread = getRenderThread()
				@pdfjs = PDFJS.getDocument {url: @url, rangeChunkSize: 2*65536, worker: @thread.worker}
				@pdfjs.onProgress = @options.progressCallback
				@document = $q.when(@pdfjs)
				@navigateFn = @options.navigateFn

	# App = angular.module 'PDFRenderer', ['pdfAnnotations', 'pdfTextLayer']

	App.factory 'PDFRenderer', ['$q', '$timeout', 'pdfAnnotations', 'pdfTextLayer', 'pdfSpinner', ($q, $timeout, pdfAnnotations, pdfTextLayer, pdfSpinner) ->

		class PDFRenderer
			JOB_QUEUE_INTERVAL: 25
