ttl rotation bugfix, test refactoring