debugging indexing issues