Code fixing (IndexOutOfBoundException avoided).