Fixed indices issues.