traverse the list backwards when deleting to avoid hanging tasks if there's gaps