small fix to ttl code