       thead = ->
         angular.element(element.find('thead')[0])
       initialize = ->
+        bodyWatcher() if bodyWatcher
         parent = angular.element(element[0].parentElement)
         parent.css('min-height', minimumParentHeight() + 'px')
         parent.css('max-height', maximumParentHeight() + 'px')

        theight = minimumParentHeight() - thead()[0].offsetHeight - 20
        tbody().css('display', 'block').css('overflow-y', 'auto').css('height', theight + 'px').css('overflow-x', 'hidden')
        thead().css('display','block').css('width', tbody().find('tr')[0].offsetWidth + 'px')
      reinitialize = ->
        tbody().css('display','')
        thead().css('display','')

        until !parent
          heights.push(parent.offsetHeight)
          parent = parent.parentElement
        heights
      minimumParentHeight = ->
        Math.min.apply(Math, parentHeights())
      maximumParentHeight = ->
