Update index_test to fix bugs