       gridster.remove_widget( widget, (removedNode) ->
         # Redraw the grid - this isn't automagical
         $(grid.find('li')).each (i, widget) ->
-          $(widget).attr 'data-col', i%4+1
-          $(widget).attr 'data-row', Math.ceil((i+1)/4)
+          $(widget).attr 'data-col', i%width+1
+          $(widget).attr 'data-row', Math.ceil((i+1)/width)
     )

class Dashing.HaproxyDownHosts extends Dashing.Widget

  ready: ->
    # This is fired when the widget is done being rendered
    $(@node).find('.gridster ul').gridster({
      max_cols: 4
      min_cols: 4
    })

  onData: (data) ->

      widget = grid.find('li[id="'+id+'"]')

      if !widget.length
        widget = gridster.add_widget('<li id="'+id+'"><div class="widget widget-haproxy-down-host"><h1 id="host"></h1><p id="svname"></p><p><span id="status"></span> <span id="downtime"></span>s</p><p id="sessions">Sessions: <span></span></p></div></li>');
        widget.find('#host').text(host.label)
        widget.find('#svname').text(host.svname)
      else
        $(widget).removeClass "expired"

      widget.find('#status').text(host.status)
      widget.find('#downtime').text(host.downtime)
      widget.find('#sessions span').text(host.sessions)

      if host.status == 'MAINT'
