fix test index bugs