Fix ttl assignment bug