Fix bug when deleting task (ConcurrentModificationException)