improved handling of deleted jobs