indexing bug fixed