       data: {original: !state, change: state}
       display: (if state then "Enabling" else "Disabling") + " " + problem.name  + " for the competition."
       shouldAdd: (changes) -> _.all (_.map changes, (change) ->
-        !(change.target == problem.name and change.type == "availability"))
+        !(areChangesEqual change, {target: problem.name, type: "availability"}))
       process: () ->
         apiCall "POST", "/api/admin/problems/availability", {pid: problem.pid, state: state}
     }
+
+    change.shouldRemove = (changes) -> _.filter changes, _.partial areChangesEqual, change
 
     $("#problem-update-queue").trigger "makeChange", [change]
 

  }))())
  .done () ->
    $(".problem-state").bootstrapSwitch()

setupQueueFrame = ->
  $("#main-content").prepend """

    $.when getProblemData()
      .done (() ->
        console.log "Updating"
        $("#problem-list").trigger "filterUpdate"
      ).bind this

  $("#main-content>.container").addClass("col-md-10")

problemStateChanges = ->
  $(".problem-state").on "switchChange.bootstrapSwitch.switchChange", (e, state) ->
    console.log "Switch"
    console.log e
    pid = $(e.target).attr "id"
    problem = window.data.problems[pid]
    change = {
