Fix notices

fixing some bad array index references