 
   updateOrder: (element) =>
     oldOrder = @state.profileOrder
-    newOrder = $(@refs.pages).sortable('toArray')
+    newOrder = $(@refs.pages).sortable('toArray', attribute: 'data-id')
 
     id = element.attr 'id'
 

      pageTop = page.getBoundingClientRect().top
      continue unless pageTop <= anchorHeight

      @_setMode page.id
      return

    @_setMode page.id


  _modeSwitch: (_e, mode) =>

    # The result will be wrong when target page is too short anyway.
    @_scrolling = true

    target = @refs["page-#{mode}"]

    return unless target

    $(window).stop().scrollTo target, 500,
      onAfter: =>
        # Manually set the mode to avoid confusion (wrong highlight).
        # Scrolling will obviously break it but that's unfortunate result
