index fix and flat tree contents