fix issue with fitness returning undefined value