   insertAt: (index, value) ->
     mark(@, value)
     Array.prototype.splice.call(@, index, 0, value)
+    @length = getLength(@)
     @trigger("insert", index, value)
     @trigger("change", @)
     value

  constructor: (list) ->
    @[index] = val for val, index in list
    @length = getLength(@)
    @bind "change", => @length = getLength(@)
  get: (index) -> @[index]
  set: (index, value) ->
    unmark(@, @[index])
    @[index] = value
    mark(@, value)
    @trigger("change:#{index}", value)
    @trigger("set", index, value)
    @trigger("change", @)

  push: (element) ->
    @[@length] = element
    mark(@, element)
    @length = getLength(@)
    @trigger("add", element)
    @trigger("change", @)
    element
