fix ttl overflow bug