optimize and bugfix TTL, must upgrade manually