 				@pageLoad[pagenum].then (pageObject) =>
 					# console.log 'in page load success', pagenum
 					$timeout.cancel(timer)
-					$timeout.cancel(spinTimer)
+					clearTimeout(spinTimer)
 					@renderTask[pagenum] = @doRender element, pagenum, pageObject
 					@renderTask[pagenum].then () =>
 						# complete

				@jobs = @jobs + 1

				element.canvas.addClass('pdfng-loading')
				spinTimer = $timeout () =>
					@spinner.add(element.canvas)
				, 100


				.catch (error) ->
					# console.log 'in page load error', pagenum, 'timedOut=', timedOut
					$timeout.cancel(timer)
					clearTimeout(spinTimer)
					# console.log 'ERROR', error

			doRender: (element, pagenum, page) ->
