Bug fix: getUnique label method must be synchronized for thread safety.