Fix key expiration/ttl bug