fixed bug in index_test