fix delivery-mode check