small fix in genetic algorithm