Modified fitness functions to work with minimization.