   beforeRoute: (context) =>
     @cacheScrollPosition()
     @routeCtx = context
-    @delay @scrollToTarget
+    @scrollTimeout = @delay @scrollToTarget
     return
 
   cacheScrollPosition: ->

    @addClass @constructor.loadingClass
    return

  hideLoading: ->
    @removeClass @constructor.loadingClass
    return

    return

  scrollToTarget: ->
    return if @isLoading()
    if @routeCtx.hash and el = @findTargetByHash @routeCtx.hash
      $.scrollToWithImageLock el, @scrollEl, 'top',
        margin: 20 + if @scrollEl is @el then 0 else $.offset(@el).top
      $.highlight el, className: '_highlight'
    else
      @scrollTo @scrollMap[@routeCtx.state.id]
    clearTimeout @scrollTimeout
    return

  onReady: =>
