Fix thread selection on delete