fixes double-reindexing problem