fixing lead time left algorithms.