Lp 1861319: Repair expire setting logic