fix expiration and tests