Fix errors in reindex