 					, (error) ->
 						self.errorCallback?(error)
 				.catch (error) ->
-					# console.log 'page render failed', pagenum, error
+					# page render failed
 					$timeout.cancel(timer)
 					if timedOut
-						# console.log 'calling ERROR callback - was timeout'
 						self.errorCallback?('timeout')
-					else if error != 'cancelled'
-						# console.log 'calling ERROR callback'
+					else if error is 'cancelled'
+						return # do nothing when cancelled
+					else
 						self.errorCallback?(error)
 
 				return result
 
-			stop: () ->
-
 			destroy: () ->
-				# console.log 'in pdf renderer destroy', @renderQueue
 				@shuttingDown = true
 				@resetState()
 				@pdfjs.then (document) ->

				@errorCallback = @options.errorCallback
				@pageSizeChangeCallback = @options.pageSizeChangeCallback
				@pdfjs.promise.catch (exception) =>
					# console.log 'ERROR in get document', exception
					@errorCallback(exception)

			resetState: () ->
				#console.log 'called reset state'
				@renderQueue = []
				clearTimeout @queueTimer if @queueTimer?
				# clear any existing timers, render tasks

				@pageState[pagenum] = pageState = { loadTask: loadTask }

				loadTask.then (pageObject) =>
					# page load success
					$timeout.cancel(timer)
					return if loadTask.cancelled # return from cancelled page load
					pageState.renderTask = @doRender element, pagenum, pageObject
					pageState.renderTask.then () =>
						# render task success
						@clearIndicator page
						pageState.complete = true
						delete pageState.renderTask
						@removeCompletedJob pagenum
					, () =>
						# render task failed
						# could display an error icon
						pageState.complete = false
						delete pageState.renderTask
						@removeCompletedJob pagenum
				.catch (error) ->
					# page load error
					$timeout.cancel(timer)
					@clearIndicator page

			doRender: (element, pagenum, page) ->
				self = this
				scale = @scale

				if (not scale?)
					# scale is undefined, returning
					return

				canvas = $('<canvas class="pdf-canvas pdfng-rendering"></canvas>')
