solve isue with index