handle deleted items better on the graphs and targets page