fix issue for index