Fixed indexes in learningCells().