Correcting a bug obtaining the population and generation numbers in genetic algorithm