Fixed the fitness function