       pageTop = page.getBoundingClientRect().top
       continue unless pageTop <= anchorHeight
 
-      @setState mode: page.getAttribute('id')
+      @_setMode page.id
       return
 
-    @setState mode: page.getAttribute('id')
+    @_setMode page.id
 
 
   _modeSwitch: (_e, mode) =>

        # Manually set the mode to avoid confusion (wrong highlight).
        # Scrolling will obviously break it but that's unfortunate result
        # from having the scrollspy marker at middle of page.
        @setState mode: mode, =>
          # Doesn't work:
          # - part of state (callback, part of mode setting)
          # - simple variable in callback

    anchorHeight = window.innerHeight * 0.5

    if osu.bottomPage()
      @_setMode _.last(pages).id
      return

    # FIXME: I don't remember why this one scans from bottom while
