Fix index rebuild