Fixed indices being off by 1.