fixbug for index