Fix NullReferenceException caused by batch operations on expired jobs