More "Index out of range" fixes.