fixed index; still have attribute issue on datasets in legacy code