improve ttl detection