updates to fix an indexing problem