fixed iteration for multiple datastores/indexes