Fixed Index out of range on line 111