Added handling of NaN and infinite cases into individual fitness comparisons.