     renderPane = (child, index) =>
       @renderPane child, index
 
-    childTabs = @props.children.map renderTab if @props.children
-    childPane = @props.children.map renderPane if @props.children
+    childTabs = @state.children.map renderTab if @state.children
+    childPane = @state.children.map renderPane if @state.children
 
     <div>
-      <div className={className}>
+      <div className={className} ref="tabs">
         {childTabs}
       </div>
       <div ref="contents">


  getInitialState: ->
    activeKey: @props.activeKey

  getDefaultProps: ->
    ptClass: "tab-group"

    catch
      null

  sortableOptions:
    ref: "tabs"
    model: "children"

  render: ->
    classes = @getPtClassSet()
    className = classNames @props.className, classes
