Fix errors in reindex process