fixed saving index with dataset