minor ttl calculation fixes; fixed timeout