fix bug for expiry