Improve code and read ttl from expired, if so