       Notify.error "Error rendering page #{ page.pdfPage.pageNumber }", args
 
   showTEI: =>
-    focusAnnotationId = null
-
     # To make sure we are starting with empty slate
     @_$displayWrapper.empty()
     publicationDOMReady.set false

        LocalAnnotation.documents.update @_id,
          $unset:
            editing: ''

        focusAnnotationId = @_id

        Meteor.Router.toNew Meteor.Router.annotationPath Session.get('currentPublicationId'), Session.get('currentPublicationSlug'), @_id


    Notify.debug "Destroying publication #{ @_id }"

    currentPublication = null

    pages = @_pages or []
    @_pages = null # To remove references to pdf.js elements to allow cleanup, and as soon as possible as this disables other callbacks
