Fix issue on scan delivery code